Subject: Re: ioctl and EOPNOTSUPP
To: Christos Zoulas <christos@zoulas.com>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 06/05/2003 05:01:33
On Wednesday 04 June 2003 21:42, Christos Zoulas wrote:
> In article <200306050431.58951.ianzag@megasignal.com>,
>
> Ian Zagorskih <ianzag@megasignal.com> wrote:
> >On Wednesday 04 June 2003 13:25, Simon Burge wrote:
> >
> >According to:
> >
> >http://www.opengroup.org/onlinepubs/007904975/basedefs/errno.h.html#ta=
g_13
> >_10
> >
> >...both ENOTTY and EOPNOTSUP are required by POSIX.
>
> Read carefully. EOPNOTSUP is only meaningful on sockets, not as the ret=
urn
> value of ioctl(). In fact, if you look at the man page for ioctl(), you=
'll
> see that EOPNOTSUP is not supposed to be returned by ioctl().
>
> I don't the ENOTTY kitchensink approach but the standards mandate
> otherwise.
Yes, you are right. At least ioctl(2) description from
http://www.opengroup.org/onlinepubs/007904975/functions/ioctl.html
=2E.says the same just course it's applicible on exactly STREAMs file=20
descriptors. But as far as i understand in NetBSD ioctl() can be called w=
ith=20
any fd, no ? It's not required to be STREAMS.
// wbr