[Libsysio-commit] HEAD: libsysio/src fcntl.c
Brought to you by:
lward
From: MeiJia <me...@us...> - 2004-08-05 18:30:08
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25758/src Modified Files: fcntl.c Log Message: lustre hacking specific code: add ioctl support in socket/native driver. not clear how to do with stdfd Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- fcntl.c 27 Jul 2004 15:00:43 -0000 1.20 +++ fcntl.c 5 Aug 2004 18:29:57 -0000 1.21 @@ -59,29 +59,9 @@ static int _sysio_fcntl(int fd, int cmd, va_list ap, int *rtn) { - long arg; + long arg = va_arg(ap, long); - switch (cmd) { - case F_GETFD: - case F_GETFL: - case F_GETOWN: - *rtn = syscall(SYS_fcntl, fd, cmd); - break; - case F_DUPFD: - case F_SETFD: - case F_SETFL: - case F_GETLK: - case F_SETLK: - case F_SETLKW: - case F_SETOWN: - arg = va_arg(ap, long); *rtn = syscall(SYS_fcntl, fd, cmd, arg); - break; - default: - *rtn = -1; - errno = EINVAL; - } - return *rtn == -1 ? -errno : 0; } #endif |