Subject: Obtaining different device behaviour
To: None <tech-kern@NetBSD.ORG>
From: David Seifert <firstname.lastname@example.org>
Date: 03/18/1996 09:08:41
Another way for a user level program to signal to the kernel
that it wants different behaviour from a device is to set a
bit in the flags to the open(2) call. This seems cleaner to me
than cluttering up /dev with ever expanding numbers of device
entries. To my way of thinking, one physical device should have
one entry in /dev. If you want the open to behave differently you
pass a flag to open(2).
> On Fri, 23 Feb 1996, der Mouse wrote:
> > 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.
> FreeBSD does almost exactly that. It seems to work OK, and I think it's
> rather elegant.
> --apb (Alan Barrett)