[Libsysio-commit] b_lustre: libsysio/drivers/sockets sockets.c
Brought to you by:
lward
|
From: Mei <me...@us...> - 2004-01-11 06:43:26
|
Update of /cvsroot/libsysio/libsysio/drivers/sockets
In directory sc8-pr-cvs1:/tmp/cvs-serv11587/drivers/sockets
Modified Files:
Tag: b_lustre
sockets.c
Log Message:
remove the obsolete fcntl hack.
Index: sockets.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/drivers/sockets/Attic/sockets.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -w -b -B -p -r1.1.2.5 -r1.1.2.6
--- sockets.c 15 Dec 2003 08:25:43 -0000 1.1.2.5
+++ sockets.c 11 Jan 2004 06:43:22 -0000 1.1.2.6
@@ -239,9 +239,29 @@ sockets_inop_fcntl(struct inode *ino __I
int cmd __IS_UNUSED,
va_list ap __IS_UNUSED)
{
+ long arg;
+
assert(I2SKI(ino)->ski_fd >= 0);
- return _sysio_fcntl_common(I2SKI(ino)->ski_fd, cmd, ap);
+ switch (cmd) {
+ case F_GETFD:
+ case F_GETFL:
+ case F_GETOWN:
+ return syscall(SYS_fcntl, I2SKI(ino)->ski_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, I2SKI(ino)->ski_fd, cmd, arg);
+ default:
+ printf("uncatched cmd %d\n", cmd);
+ abort();
+ }
+ return -1;
}
static int
|