At 3:27 PM -0700 2001-05-12, Shane Wegner wrote:
>  >    int err = dev->ioctlfunc(dev, op, arg);
>>      if( err != -ENOIOCTLCMD)
>>              return err;
>>
>>      /* Driver specific code does not support this ioctl */
>
>I noticed this return coming out of the watchdog driver a
>while ago when I was playing with it.  I have taken a quick
>look and it seems a few drivers do return this directly to
>userspace.  I'm not sure if this is complete but ...

Can't this be handled in sys_ioctl()? At the very end, replace

out:
        return error;

with

out:
        return (error == -ENOIOCTLCMD) ? -ENOTTY : error;


>diff -ur linux-2.4.4-ac8/drivers/block/swim3.c linux/drivers/block/swim3.c
>--- linux-2.4.4-ac8/drivers/block/swim3.c      Sat May 12 14:59:44 2001
>+++ linux/drivers/block/swim3.c        Sat May 12 15:22:30 2001
>@@ -848,7 +848,7 @@
>                                  sizeof(struct floppy_struct));
>               return err;
>       }
>-      return -ENOIOCTLCMD;
>+      return -ENOTTY;
>  }


-- 
/Jonathan Lundell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to