1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
Commit Graph

22 Commits

Author SHA1 Message Date
Kay Sievers
4ec9c3e797 use /run/udev/ if possible and fall back to /dev/.udev/ 2011-03-23 02:31:09 +01:00
Kay Sievers
5f59fa0900 move /dev/.udev/ to /dev/.run/udev/ and convert old udev database at udevd startup 2011-03-15 17:26:08 +01:00
Kay Sievers
cad40a5fe7 udevd: switch to common id_filename functions 2010-12-12 20:07:15 +01:00
Kay Sievers
4281da1fa6 udevd: use dev_t or netif ifindex as database key
We need to preserve the database of network interfaces while we
rename them. Use the kernel's numbers wherever possible, instead
of the device names.

Fix wrong database filenames which contain a '/', translated
from '!' in the kernel name.

Fix segfault for kobject pathes where the subsystem can not be
determined from sysfs.
2010-12-10 01:18:15 +01:00
Kay Sievers
60067cc75a more readlink buffer size handling 2010-04-21 14:44:33 +02:00
Kay Sievers
777239cb21 use major:minor as entries in watch directory 2010-03-10 18:54:35 +01:00
Kay Sievers
26347a4c55 use CLOEXEC flags instead of fcntl() 2009-10-30 12:39:04 +01:00
Kay Sievers
ebc1ba78ed inotify_add_watch(): do not store watch, if it failed
On Sun, Aug 30, 2009 at 04:36, Marco d'Itri<md@linux.it> wrote:
> inotify_add_watch may fail in udev_watch_begin, and then a link with
> name -1 is created.
> I do not know why, but it happened once on my system:
>
> lrwxrwxrwx 1 root root 27 Aug  4 11:27 -1 -> /devices/virtual/block/ram8
2009-08-30 20:42:06 +02:00
Kay Sievers
1e03b754ae udevd: convert to event worker processes
Event processes now get re-used after they handled an event. This reduces
pressure on the CPU significantly because cloned event processes no longer
cause page faults in the main daemon. After the events have settled, the
no longer needed worker processes get killed.
2009-06-04 01:44:04 +02:00
Kay Sievers
e6c1a2bde7 use openat(), unlinkat(), fstatat() 2009-05-20 18:58:52 +02:00
Kay Sievers
065db05221 use more efficient string copying 2009-05-20 17:57:52 +02:00
Alan Jenkins
4b09a2fc43 avoid leaking netlink socket fd to external programs
The netlink socket is now used by udev event processes. We should take
care not to pass it to the programs they execute. This is the same way
the inotify fd was handled.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-04-06 07:23:35 -07:00
Kay Sievers
45bcd16ca5 udevd: switch watch symlinks to devpath
Some broken tools get confused following links to /sys, switch
to link targets carrying the devpath instead of the syspath, like
the queue links.
2009-03-05 00:35:58 +01:00
Kay Sievers
3d3a0a709a use the event udev_device to disable the watch on "remove" 2009-02-24 15:11:17 +01:00
Kay Sievers
d5d04d4f9f remove static local variable 2009-02-24 12:58:48 +01:00
Scott James Remnant
9ce462721a Put a log message in a more sensible place. 2009-02-23 17:46:00 +00:00
Scott James Remnant
047f88bca3 Use the udevdb to speed up watch clearing.
Also return a udev_device when looking up by handle as well, so
everything works the same way.
2009-02-23 17:43:53 +00:00
Scott James Remnant
25bdd197ec Store watch handle in db. 2009-02-23 17:34:07 +00:00
Scott James Remnant
03e0170db3 Cleanup a little.
Move some of the checks into udev_watch_begin() and udev_watch_clear()
so we don't have to repeat them all the time.
2009-02-23 17:21:24 +00:00
Kay Sievers
64746532e8 rules: add "watch" option to dm and md rules 2009-02-13 16:02:36 +01:00
Kay Sievers
4aca304e48 use global "reload_config" flag 2009-02-11 21:56:35 +01:00
Scott James Remnant
bd284db142 udevd: optionally watch device nodes with inotify
This allows you to re-process the rules if the content of the device
has been changed, most useful for block subsystem to cause vol_id to
be run again.
2009-02-11 17:38:56 +00:00