Gr�goire Colbert wrote:
> Hello,
>
> I've uploaded libraw1394-4mdk to incoming. Changelog :
> - /dev/video1394 is created. The reason is that Andreas Bombe, who works
> on the Linux IEEE1394 project and knows the subject quite well, says
> that no package creates /dev/video1394, and so it has to be created by
> hand. But why bothering people, and not add this devnode to the low
> level library which libraw1394 is? Now everything should work out of the
> box for video edition, and this is what I like.
>
> Question : what is devfs ? Does that prevent packagers to create
> devnodes in the specfiles ?
>
Devfs is kernel facility that dynamically manages entries in "device
namespace". From the user point of view it looks like average
filesystem; you just mount it on /dev and let it do its job. Drivers
call at approrpiate places (usually when corresponding harsware is
found) devfs_register functions that add names to devfs namespace (and
they appear in /dev) and call devfs_unregister if hardware or driver go
away. Thus (ideally, life is not as simple :-) devfs always reflects the
current state of arts - only those (pseudo-)devices that are really
present appear under /dev.
Because devfs is pure kernel abstraction all entries in devfs go away
when system shuts down. There are several ways to overcome it:
- if you are using specific kernel module it ideally should support devfs
- you can instruct devfsd to create node for you when you try to open
it. devfsd is helper application that reponds to some events generated
by devfs. E.g. assume you are looking for /dev/cdroms/cdrom1 devfs
generates LOOKUP event that is received by devfsd. In normal
configuration devfsd now tries to load modules that provide CD-ROM
support (such as sr_mod for SCSI CD-ROM). If one of them succeeds it
registers the above name and voila - it appears under /dev
automagically. devfsd can just run mknod to create name if needed.
- in current cooker /dev is copied in NVRAM :-) and restored on reboot.
So it is enough to just create node once.
Note, that devfs manages major/minor numbers dynamically. It knows about
standard numbers existed so far; but if your number is not registered in
may happen that it is already claimed by devfsd when you try to create it.
HTH :-)
-andrej