Subject: Re: ioctl and EOPNOTSUPP
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-kern
Date: 06/04/2003 23:40:23
Jason Thorpe <thorpej@wasabisystems.com> writes:

> On Wednesday, June 4, 2003, at 12:11  PM, Frank van der Linden wrote:
> 
> > I like EOPNOTSUPP better myself, but if the standard mandates ENOTTY,
> > than ENOTTY it shall be. Go head, I'd say.
> 
> Yah, ENOTTY is correct.  However, there are some circumstances where
> EOPNOTSUPP is appropriate, though.  Consider the case of a driver
> which fits into a subsystem which exports a feature, but the driver
> does not support that particular feature... that would be a case where
> EOPNOTSUPP would be appropriate.

One nit in here is that POSIX ties EOPNOTSUPP to socket operations.
However, with ENOTSUP being equally tied to the Realtime option group,
that doesn't make a compelling case against using EOPNOTSUPP except
where a different error is required.


- Klaus