From dcec8a13bf565e47942a1751a9cec21bec5648fe Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 7 May 1998 02:55:41 +0000 Subject: o Merge with Linux 2.1.99. o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz. --- arch/sparc64/kernel/sunos_ioctl32.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'arch/sparc64/kernel/sunos_ioctl32.c') diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c index d94a7c6d6..a0bfb47ef 100644 --- a/arch/sparc64/kernel/sunos_ioctl32.c +++ b/arch/sparc64/kernel/sunos_ioctl32.c @@ -1,4 +1,4 @@ -/* $Id: sunos_ioctl32.c,v 1.5 1997/09/18 10:37:57 rth Exp $ +/* $Id: sunos_ioctl32.c,v 1.9 1998/03/29 10:10:53 davem Exp $ * sunos_ioctl32.c: SunOS ioctl compatability on sparc64. * * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -88,15 +89,12 @@ extern asmlinkage int sys_setsid(void); asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg) { - struct file *filp; int ret = -EBADF; lock_kernel(); if(fd >= SUNOS_NR_OPEN) goto out; - - filp = current->files->fd[fd]; - if(!filp) + if(!fcheck(fd)) goto out; if(cmd == TIOCSETD) { @@ -168,7 +166,7 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg) ret = sys32_ioctl(fd, SIOCGIFBRDADDR, arg); goto out; case _IOW('i', 24, struct ifreq32): - ret = sys32_ioctl(fd, SIOCGIFBRDADDR, arg); + ret = sys32_ioctl(fd, SIOCSIFBRDADDR, arg); goto out; case _IOWR('i', 25, struct ifreq32): ret = sys32_ioctl(fd, SIOCGIFNETMASK, arg); -- cgit v1.2.3