[Libsysio-commit] b_lustre: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Mei <me...@us...> - 2003-06-19 12:24:35
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs1:/tmp/cvs-serv29421/drivers/native Modified Files: Tag: b_lustre fs_native.c Log Message: - fcntl on native driver - typo fix Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.11.2.1 retrieving revision 1.11.2.2 diff -u -w -b -B -p -r1.11.2.1 -r1.11.2.2 --- fs_native.c 30 Apr 2003 14:32:16 -0000 1.11.2.1 +++ fs_native.c 19 Jun 2003 12:24:30 -0000 1.11.2.2 @@ -1112,11 +1112,35 @@ native_inop_fcntl(struct inode *ino, va_list ap) { struct native_inode *nino = I2NI(ino); + long arg; if (nino->ni_fd < 0) abort(); - return syscall(SYS_fcntl, nino->ni_fd, cmd, ap); + switch (cmd) { + case F_GETFD: + case F_GETFL: + case F_GETOWN: +// case F_GETSIG: +// case F_GETLEASE: + return syscall(SYS_fcntl, nino->ni_fd, cmd); + case F_DUPFD: + case F_SETFD: + case F_SETFL: + case F_GETLK: + case F_SETLK: + case F_SETLKW: + case F_SETOWN: +// case F_SETSIG: +// case F_SETLEASE: +// case F_NOTIFY: + arg = va_arg(ap, long); + return syscall(SYS_fcntl, nino->ni_fd, cmd, arg); + default: + printf("uncatched cmd %d\n", cmd); + abort(); + } + return -1; } static int |