[Libsysio-commit] b_lustre: libsysio/src fcntl.c
Brought to you by:
lward
From: Mei <me...@us...> - 2004-01-11 06:43:25
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv11587/src Modified Files: Tag: b_lustre fcntl.c Log Message: remove the obsolete fcntl hack. Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.3.2.13 retrieving revision 1.3.2.14 diff -u -w -b -B -p -r1.3.2.13 -r1.3.2.14 --- fcntl.c 22 Dec 2003 02:33:48 -0000 1.3.2.13 +++ fcntl.c 11 Jan 2004 06:43:22 -0000 1.3.2.14 @@ -57,31 +57,6 @@ #include "sysio-symbols.h" -int _sysio_fcntl_common(int fd, int cmd, va_list ap) -{ - int err; - long arg; - - switch (cmd) { - case F_GETFD: - case F_GETFL: - case F_GETOWN: - return syscall(SYS_fcntl, fd, cmd); - 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); - return syscall(SYS_fcntl, fd, cmd, arg); - } - - printf("sysio: unrecongnized fcntl cmd %d on fd %d\n", cmd, fd); - return -ENOSYS; -} - int fcntl(int fd, int cmd, ...) { @@ -93,11 +68,8 @@ fcntl(int fd, int cmd, ...) err = 0; fil = _sysio_fd_find(fd); if (!fil) { - va_start(ap, cmd); - err = _sysio_fcntl_common(fd, cmd, ap); - va_end(ap); - SYSIO_LEAVE; - return err; + err = -EBADF; + goto out; } switch (cmd) { |