patch-2.1.17 linux/fs/ioctl.c
Next file: linux/fs/minix/bitmap.c
Previous file: linux/fs/fcntl.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Thu Dec 19 11:03:36 1996
- Orig file:
v2.1.16/linux/fs/ioctl.c
- Orig date:
Fri Nov 1 17:13:19 1996
diff -u --recursive --new-file v2.1.16/linux/fs/ioctl.c linux/fs/ioctl.c
@@ -47,6 +47,7 @@
asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
{
struct file * filp;
+ unsigned int flag;
int on, error;
if (fd >= NR_OPEN || !(filp = current->files->fd[fd]))
@@ -63,10 +64,16 @@
case FIONBIO:
if ((error = get_user(on, (int *)arg)) != 0)
return error;
+ flag = O_NONBLOCK;
+#ifdef __sparc__
+ /* SunOS compatability item. */
+ if(O_NONBLOCK != O_NDELAY)
+ flag |= O_NDELAY;
+#endif
if (on)
- filp->f_flags |= O_NONBLOCK;
+ filp->f_flags |= flag;
else
- filp->f_flags &= ~O_NONBLOCK;
+ filp->f_flags &= ~flag;
return 0;
case FIOASYNC: /* O_SYNC is not yet implemented,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov