Messages in this thread | | | Date | Sun, 4 Jan 1998 11:41:16 +1100 | From | Richard Gooch <> | Subject | Re: PROPOSAL: /proc/dev |
| |
Linus Torvalds writes: > But the good thing with a devfs would be that the /dev directory would > only be populated with devices that we actually have - so it wouldn't be > nearly as large as a "real" /dev.
Yep. Plus other clever things you can then do:
> Btw, devfs should probably think long and hard about pty's...
I don't know what you had in mind here. There is the issue of registering all these /dev entries, but it should be easy enough to come up with an interface which doesn't require a driver to call dev_register() a zillion times (i.e. code in devfs effectively does the individual registrations).
The more interesting opportunity is setting permissions on tty devices. You could specify with dev_register() that when a device/inode is opened, the ownership should be set to the process that opened it "first". When the device is closed for the last time (before someone else uses the pty at a later time), the ownership reverts back to the default. BTW: These automatic ownership changes wouldn't be preserved across reboots via the boot/shutdown mechanism. I think this is a much nicer way of giving ownership rights for tty devices than relying on a special daemon.
Regards,
Richard....
| |