Jérôme Duval <korli@xxxxxxxxxxxxxxxx> wrote: > 2011/3/3 Ingo Weinhold <ingo_weinhold@xxxxxx>: > > Yes, though I thought that would only be done for the two ioctls > > you > > mentioned. Admittedly I hadn't looked at the ioctl() specification > > before. > > Apparently ENOTTY is the right error when the file isn't a STREAMS > > device > > (i.e. that's the one to be returned by "normal" file systems) ENODEV > > when > > the file is a STREAMS device, but generally doesn't support > > ioctl(), and > > EINVAL, if the particular ioctl isn't supported. > Right. It's just a bit weird to use ENOTTY in file systems and no B_* > error code mapped to it. You could just create such a mapping, though :-) > > I would suggest to consequently use the error codes POSIX specifies > > for the > > respective cases. That would leave B_DEV_INVALID_IOCTL unused. IOW: > > > > * no FS ioctl() hook -> ENOTTY > > > > * devfs, no device ioctl() hook -> ENODEV or ENOTTY (depending on > > character > > vs. block device?) I find ENODEV a bit strange, though, as the device is apparently alive and kicking :-) Bye, Axel.