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

Re: Question about /dev/



Le Wed, 23 Mar 2005 17:22:52 -0500, Roberto C. Sanchez a écrit :

> Is MAKEDEV necessar with udev?  I understand that it doesn't autoload
> kernel modules like devfs (which I used for quite a long time), but I
> thought that devices were created only when the particular hardware
> or driver registered with the kernel.  I though MAKEDEV was used to
> populate the entire /dev.

MAKEDEV with devfs or udev is only usefull if you need to create class of
device files statically (saved after reboot) : MAKEDEV dsp will create all
/dev/dsp for example.

udev does not autoload modules like devfs. BUt hotplog (sysfs being the
kernel part of hotplug) load them all at boot or when plugged. So if a
device file is not created it is because either because the driver does
not support sysfs yet (as driver which did not supported devfs failed too)
or if it is a userland driver (for example gphoto driver) because it is
not in the hotplug map file (which tell hotplug what to do when the kernel
find a new hardware ... somewhat like window when he ask for drivers only
this is done automatically).
So the autoload feature of devfs would be useless on a udev/hotplug/linux
2.6 kernel . driver are not loaded when you try to access the hardware but
when the hardware is detected by the kernel.

/dev/.static or old /.dev are really usefull as not all kernel drivers are
yet ported to sysfs/hotplug (and some won't be before 2.7 as the risk for
mass bugs is too heavy : console driver ...). Well they may be if 2.7
takes too long to appear.

Ciao
Alban




Reply to: