[Libsysio-commit] HEAD: libsysio/src fcntl.c
Brought to you by:
lward
From: Ruth K. <rk...@us...> - 2004-07-26 16:37:42
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9662 Modified Files: fcntl.c Log Message: fcntl fixes: fcntl may return a positive or negative value. Driver function interfaces have been changed to accomodate a returned system call value in the arguments. The return value of the driver functions is 0 for success and -errno for failure. Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- fcntl.c 21 Jul 2004 00:45:44 -0000 1.16 +++ fcntl.c 26 Jul 2004 16:37:18 -0000 1.17 @@ -88,6 +88,7 @@ int SYSIO_INTERFACE_NAME(fcntl)(int fd, int cmd, ...) { int err; + int rtn; struct file *fil; va_list ap; SYSIO_INTERFACE_DISPLAY_BLOCK; @@ -127,13 +128,13 @@ SYSIO_INTERFACE_NAME(fcntl)(int fd, int break; default: va_start(ap, cmd); - err = fil->f_ino->i_ops.inop_fcntl(fil->f_ino, cmd, ap); + err = fil->f_ino->i_ops.inop_fcntl(fil->f_ino, cmd, ap, &rtn); va_end(ap); break; } out: - SYSIO_INTERFACE_RETURN((err < 0) ? -1 : err, (err < 0) ? err : 0); + SYSIO_INTERFACE_RETURN(rtn, err); } #ifdef __GLIBC__ |