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

Hi uebs,

> Fair enough.
> After some thinking, providing "traditional" view and persistent bits
> turns out to be not that difficult.
> /dev has a few reserved directory (like /dev/id). ÂYou have no freedom
> there. ÂAny access other than that goes to devfsd. ÂIt has knowledge
> equivalt to sys/arch/*/conf/majors.* as reference. ÂAnd it tracks
> mknod(2), rename(2), etc per-mount point.
> When you do mknod(/dev/wd0a); rename(/dev/wd0a, /dev/woah0a);
> open(/dev/woah0a), devfsd resoves it by using DBs and converts it to
> something like /dev/default/wd0a and pass it back to kernel.
> You have to shutdown cleanly, otherwise you lose DB.
> Initial mount needs some thought.

This seems as wrong approach to me. I was in contact with mjf@ when he
designed his devfs and I think that his approach was not the best but
reasonable. We do not want to have any sort of static major number
definition everything should be dynamic. There should be some sort of
config file which describe what should devfsd do when it receive event
from kernel. e.g. if usb key with uuid abc was inserted create
/dev/usb_work_key device.

AFAIK. last version of devfsd was able to handle dynamic major numbers
and configuring devices accordingly to config file(proplist).




Home | Main Index | Thread Index | Old Index