Re: -ENOT_SUPPORTED_BY_THIS_DRIVE ?

Erik Andersen (andersen@inconnect.com)
Tue, 23 Sep 1997 15:37:17 -0600 (MDT)


I believe you are looking for ENOSYS.

As one of the things I am doing in my ever-expanding-in-scope
CD include patch (see http://www.inconnect.com/~andersen/files)
is to return ENOSYS for non-implemented functions instead of
EINVAL. Grep /usr/include/asm/errno.h some time and you will
have your eyes opened to all the official things that can go wrong.

-Erik

p.s. My current patch only partly works, but at least it only partly works
with 4 drivers ported to the uniform cdrom driver... [GRIN]
Brave people only at this point.

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

On Tue, 23 Sep 1997, Gerd Knorr wrote:

> > Hi ! > > While hacking the scsi cdrom driver and teaching him to return useful > errno codes on failed ioctls I came across the following problem: > > I hav'nt found a error code to tell a program that the drive does not > support some action. Well, there is that generic EINVAL, but I'd like to > be a bit more specific. A audio ioctl for example might fail for two > reasons: > > a) there are invalid parameters (one tried to start audio playback > behind the last track or something). EINVAL is ok for this one > I think. > b) The drives does'nt support the scsi-2 audio commands at all (some > old nec drives). For this one I'd like to return something else than > just EINVAL. Is there some error code for this kid of errors? > > Gerd > >