Re: [PATCH 1/2] gigaset: return -ENOSYS for unimplemented functions

From: Arjan van de Ven
Date: Sat Mar 07 2009 - 19:35:14 EST


On Sun, 08 Mar 2009 01:22:28 +0100
Tilman Schmidt <tilman@xxxxxxx> wrote:

> Am 07.03.2009 23:26 schrieb Arjan van de Ven:
> > On Sat, 7 Mar 2009 23:10:57 +0100 (CET)
> > Tilman Schmidt <tilman@xxxxxxx> wrote:
> >
> >> From: Paul Bolle <pebolle@xxxxxxxxxx>
> >>
> >> A number of functions in the usb_gigaset module will return
> >> -EINVAL if CONFIG_GIGASET_UNDOCREQ is not set. Make these return
> >> -ENOSYS as it's more specific and it might make it easier to see
> >> (from userspace) why these functions actually fail.
> >>
> >> Impact: some error return codes changed
> >
> > ENODEV is what would be more appropriate.
>
> Not at all. ENODEV means "no such device", which would be quite wrong.
> The device does exist and is in all probability working perfectly
> fine. It just doesn't implement that particular ioctl.

then -ENOTTY is the right answer
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/