Subject: Re: New experimental ioctl's for serial driver
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Date: 02/23/1996 07:40:46
> I'd say that TTY ioctls that are "device-independent", e.g. the one
> for setting the default termios state, either: [...]
I agree with cgd here.
> [I]f the feature is _needed_ (and i'm not at all convinced that your
> 'default termios state' features _are_ really needed, but probably
> could be),
Let's put it this way: if that person succeeds in making that work (and
I see no reason it would be difficult to do), I want the code too, and
it'll go into my private patch tree. Uncertainty as to what happens on
open has been a real pain for me wrt serial lines; how much state is
reset on each first open varies from OS to OS among the machines I use.
I would love to have the driver keep a reset-to-this-state state.
That said, I'm not that sure I like the proposed mechanism, with a
parallel set of ioctls. That means that either stty needs a somewhat
ugly kludge or you can't use stty to frob the first-open state.
How about using a bit in the minor device number to mean
"first-open-state device", and have that device support nothing but the
usual tty-state getting and setting ioctls, and have them affect the
first-open state rather than the active state?
Then you just "stty -f /dev/fty04 raw -echo -echonl" or some such to
modify the first-open state of /dev/tty04.