Re: LANANA: To Pending Device Number Registrants

H. Peter Anvin
2001-05-15T20:07:08Z

James Simmons wrote:
> >
> > Don't get boxed in by thinking that you only have one fd. Even if you have
> > only one _device_node_, you can have multiple fd's. In fact, you can, with
> > the Linux VFS layer, fairly easily do things like
> >
> > mknod /dev/fd0 c X Y
> >
> > and then use
> >
> > fd = open("/dev/fd0/colourspace", O_RDWR);
>
> Yipes!! I have to say UNIX has a tendency to teach you ioctl is the only
> way. I have never thought outside of the box nor see anyone else in this
> manner. This is absolutely brillant!!! I can see alot of possibilties with
> this.
>

I actually suggested something like this a while ago, mainly w.r.t. how
to deal with serial ports (e.g. /dev/ttyS0/callout instead of /dev/cua0).

-hpa

--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."