Subject: Re: ioctl and EOPNOTSUPP
To: None <tech-kern@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 06/05/2003 05:45:19
On Wednesday 04 June 2003 22:29, David Laight wrote:
> > Yes, you are right. At least ioctl(2) description from
> >
> > http://www.opengroup.org/onlinepubs/007904975/functions/ioctl.html
> >
> > ..says the same just course it's applicible on exactly STREAMs file
> > descriptors. But as far as i understand in NetBSD ioctl() can be call=
ed
> > with any fd, no ? It's not required to be STREAMS.
>
> Indeed - which actually means that the errno values aren't defined eith=
er.
>
> Posix / X/Open (now TOG) doesn't define ioctl() because it would have
> been impossible to get any agreement about what it should do.
> However the few STREAMS ioctls are (reasonably) well defined and are
> necessary if STREAMS are supported - hence the inclusion of ioctl()
> in POSIX.
>
> There ought to be a note that effect of ioctl() on non-STREAMS fds
> is 'undefined' (in this case including formating the hard disk!)
>
> I can't remember which working group got STREAMS into posix.
> I only know it wasn't the X/Open networking group (XNET).
>
> =09David
Well, it's marked as "xsi" so:
--- cut---
This function is marked as part of the XSI STREAMS Option Group.
---cut---
=2E.which means:=20
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap02.html#ta=
g_02_01_04
// wbr