lkml.org 
[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ENOIOCTLCMD?
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.126 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site