Subject: Re: switch table changes
To: None <tech-kern@NetBSD.ORG>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: tech-kern
Date: 12/13/1994 07:48:52
   2) Add a set of constants, currently D_{TAPE,DISK,TTY}.  D_TAPE should
   take the place of B_TAPE, which is currently used in d_flags, and
   D_DISK and D_TTY should be specified for appropriate devices.

In case anyone is wondering what the semantics of these are:

D_TAPE, like the current usage of B_TAPE, is used by vfs_bio.c to
cause delayed writes to a tape block device to be done synchronously.

D_DISK, like the current (ugly) isdisk(), is used to disallow opening
a device for write at securelevel == 1, and for read at securelevel ==
2.

D_TTY is used by some new file system code to set a VISTTY flag on the
vnode, which alters the behavior of reading the vnode once it has been
vgone()d.

I plan to make isdisk(), istape(), and istty() macros, which will
reside in sys/conf.h.


BTW, note that for ports using the hp300-style conf.c, it's not
correct to just change [bc]dev_disk_init() to include D_DISK, since
this will cause vn devices to stop working at securelevel >= 1.