[systemd-devel] What does udevd do

Lennart Poettering lennart at poettering.net
Sat May 30 14:52:19 PDT 2015


On Sat, 30.05.15 21:53, cee1 (fykcee1 at gmail.com) wrote:

> Hi all,
> 
> If a service wants to be notified when a device is plugged in, it
> invokes routines of libudev which actually:
> * Receive notifications from the kernel via NETLINK socket.

Not quite. udev receives notifications from the kernel via netlink,
then augments it with some additional bits, and pushes it via netlink
to the clients. 

Normal clients will never directly get the kernel notifications, but
only the ones udev propagates.

> * Query the detailed info from /sys/...
> 
> Am I right?
> 
> Then udevd is only responsible for
> 1) Making nodes, and doing other device initialization stuffs.

udev does not create device nodes. That's the job of devtmpfs in the
kernel. udev will however apply access modes/acls/fix ownership create
symlinks and so on.

> 2) Notifying systemd, let systemd start related daemons.

systemd is more or less just a normal libudev client like any other.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list