Re: LANANA: To Pending Device Number Registrants

Kai Henningsen
2001-05-17T22:42:14Z

torvalds@transmeta.com (Linus Torvalds) wrote on 15.05.01 in <Pine.LNX.4.21.0105151328160.2470-100000@penguin.transmeta.com>:

> They might also be exactly the same channel, except with certain magic
> bits set. The example peter gave was fine: tty devices could very usefully
> be opened with something like
>
> fd = open("/dev/tty00/nonblock,9600,n8", O_RDWR);
>
> where we actually open up exactly the same channel as if we opened up
> /dev/cua00, we just set the speed etc at the same time. Which makes things
> a hell of a lot more readable, AND they are again easily done from
> scripts. The above is exactly the kind of thing that UNIX has not done
> well, and some others have done better (let's face it, even _DOS_ did it
> better, for chrissake! Those callout devices and those ioctl's are a pain
> in the ass, for no really good reason).

Umm ... where to begin.

1. No, DOS didn't do it better - DOS devices were mostly a bad copy of
Xenix devices.

2. DOS definitely didn't do it better for serial ports. Serial ports are
the single most broken devices that DOS supports by default, so much so
that literally *no* serious program that needed the serial ports used the
built-in driver. Only toy programs did that. Because those drivers weren't
anything but toys themselves.

I know this the hard way. I used serial ports under DOS for something like
ten years.

MfG Kai