Messages in this thread | | | Date | Sun, 4 Jan 1998 12:00:04 +1100 | From | Kevin Lentin <> | Subject | Re: PROPOSAL: /proc/dev |
| |
On Fri, Jan 02, 1998 at 01:17:58PM +1100, Richard Gooch wrote: > If a process tries to open() an entry in /dev which does not exist, > devfs passes the name of the entry to kerneld. It is up to kerneld to > convert filenames to modules (i.e. "ttyS{0,1,2,3}" to "serial").
I hope there is a suitable wildcard (or filename globbing) scheme. This would be especially useful for disk devices. Floppy disk devices in particular are quite numerous.
> The system boot script checks it's /dev protections database and uses > chown(2) and chmod(2) to modify permissions. If an entry does not > exist, the script must first call mknod(2) which will create a > "placeholder" entry. This placeholder will appear to have major&minor > of -1,-1 or some such. When chmod(2) is called the ctime is updated. > > When a device driver registers a device entry and a placeholder entry > is already there, the entry is filled in and the major&minor will > appear to be 0,0.
Hmmm - /dev/ ends up being a script you have to keep up to date instead of a driectory. Although no majors and minors which is the major (sorry) win. And many people around here would patch their kernel anyway to change the defaults. Or the kernel could #include a standard file (eg src/.devices) if it is there to set sysadmin defaults. Either way it's a system maintenance issue (or a one line kernel change and a sysadmin issue).
-- [======================================================================] [ Kevin Lentin Email: K.Lentin@cs.monash.edu.au ] [ finger kevinl@fangorn.cs.monash.edu.au for PGP public key block. ] [ KeyId: 06808EED FingerPrint: 6024308DE1F84314 811B511DBA6FD596 ] [======================================================================]
| |