tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Semi-random) thoughts on device tree structure and devfs

On Thu, Mar 11, 2010 at 05:54:11PM -0500, Greg A. Woods wrote:
> Indeed -- I do agree with that much at least!
> I've had diskless systems running for a long while now (since 2003)
> where /dev is created by init(8) on every boot (by running
> /sbin/MAKEDEV, as I've renamed it).
> In the extremely rare cases where I've wanted to change permissions or
> similar on a device node I can just use the normal commands:
>       chmod 666 /dev/tty001
> and if I want to make such a change persistent across boots I just add
> that exact same command to /etc/rc.local.
> There's no magic needed.
> I think the only key feature necessary is that devfs handle the normal
> permissions and ownership changes, but to do so of course with no more
> persistence than tmpfs, md. or mfs.

This wouldn't work very well for hot-plug devices.
As I understand it, nodes would be created at plug time, and removed at unplug
time (correct me if I'm wrong). So you would need to run you chmod
when your e.g. USB device is plugged (which is also the time at which you
know where it will how up in the device space).

Linux udev can handle this, and it's usefull (I've got do to such
special setups at work a few time already).

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index