RTEMS use of Linux specific errno's

Peter Dufault dufault at hda.com
Fri Jun 12 17:45:16 UTC 2009


On Jun 12, 2009, at 10:39 , Joel Sherrill wrote:

> from the ioctl man page
>
>      EINVAL Request or argp is not valid.
>
> So for simple cases of bad ioctl request number, this is the
> right error.  I think the others cases fall into the ENODEV sounds
> better.  Most of the cases would be doing a block operation
> on a character device and getting back ENOTTY would confuse
> me.
>
> How does that sound?
I'm from the BSD world and the BSD man page for ioctl says:

      [ENOTTY]           The specified request does not apply to the  
kind of object that the
                         descriptor fildes references.

and I'm used to using ENOTTY for that so that's the one I'd  
automatically use.  I looked at the opengroup man page and it's just  
confusing. We're nit-picking, choose the one you like.

Peter 



More information about the users mailing list