Hi,
 With 2.6.15 and above, when a new device is added (or removed) the kernel
driver subsystem sends a uevnt to user space (BTW, these are not the only cases
where a uevent message is sent from the kernel; such a message is also sent
when there is a repartitioning of a disk , as in sfdisk -R , and when there is
a switch of console mode.).

 The user space udevd damon listens and gets this message (which is sent over
a NETLINK socket). It sees if there is a matching rule, and in case there is,
the module is loaded (or removed when the device is removed).

 For further details you can look in lib/kobject_uevet.c , in
kobject_uevent() method.

Regards,
Rami Rosen





On 8/2/06, Ilya Konstantinov <[EMAIL PROTECTED]> wrote:
Rami Rosen wrote:

> Hi,
> One little remark:
> The use of hotplug is now deprecated from kernel version 2.6.15 on.
> See for example , http://lwn.net/Articles/166954
This is confusing:
 From what I gather, udev traditionally does its work when the kernel
module is loaded and the device is already known (e.g.
KERNEL="hda[a-z]"). On the other hand, hotplug does its work when the
bus is enumerated and the device is discovered (as a bunch of PCI or USB
IDs -- not as "this is a hard drive") and loads the module, therefore
making udev trigger. How does the 2.6.15 udev take on hotplug's role?


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to