Hi devfs friends!
devfs consists of two different kinds of entries. "Real" and
"artificial" (e.g. symlinks, devices via mknod) ones.
Here a table which events devfsd gets:
real artificial
arise REGISTER CREATE
change CHANGE CHANGE
vanish UNREGISTER DELETE
If there is still nothing: LOOKUP
With this knowledge it was easier for me to reunite the two approaches
for permisson-persistens (copy in /dev-state/) and artificial entries
(special configuration in /etc/devfsd.conf).
So my devfsd.conf is looking like this (remove comments):
REGISTER .* COPY /dev-state/$devname $devpath # arise real
CREATE .* COPY $devpath /dev-state/$devname # arise artificial
CHANGE .* COPY $devpath /dev-state/$devname # change (both)
DELETE .* CFUNCTION GLOBAL unlink /dev-state/$devname
# vanish artificial
# (vanish real is uninteresting)
LOOKUP .* MODLOAD # could be "real"
LOOKUP .* COPY /dev-state/$devname $devpath # maybe artificial
"New" (and not recommended in standard devfsd.conf) is just the
handling of the events DELETE and LOOKUP.
While DELETE is not working for me (but I don't want to call it a bug
before I try the latest devfs) LOOKUP is performing good. It let's me
going without special entries in /etc/devfsd.conf.
Comments and suggestions welcome.
Bye,
Robert
|