lkml.org 
[lkml]   [1998]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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....

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.080 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site