[parisc-linux-cvs] Be "nicer" in ioctl32
Paul Bame
bame@fc.hp.com
Tue, 27 Mar 2001 13:16:15 -0700
Try the ioctl call -- many will work without wrappers.
Index: ioctl32.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ioctl32.c,v
retrieving revision 1.2
diff -u -r1.2 ioctl32.c
--- ioctl32.c 2001/03/27 19:15:49 1.2
+++ ioctl32.c 2001/03/27 20:07:14
@@ -125,9 +125,12 @@
static int siocprivate(unsigned int fd, unsigned int cmd, unsigned long arg)
{
- printk("ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based cmd not supported\n",
- fd, cmd, (void *)arg);
- return -ENOSYS;
+ int err = sys_ioctl(fd, cmd, arg);
+ if ((unsigned) err > -4095)
+ printk("ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
+ "supported, though some will work by accident.\n",
+ fd, cmd, (void *)arg);
+ return err;
}
static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)