diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-10 01:13:35 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-10 01:18:15 +0100 |
commit | 4281da1fa6fda10c15bee984825fc607a8385004 (patch) | |
tree | c92eaab4296a31bcccd754dc2b23410025158ef1 /udev/udev-event.c | |
parent | dc1791a9e6b59bd070a5f9c01b2214a1f8d69a82 (diff) |
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.
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r-- | udev/udev-event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c index 064873531b..f41f06b16a 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -535,6 +535,9 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) struct udev_device *dev = event->dev; int err = 0; + if (udev_device_get_subsystem(dev) == NULL) + return -1; + if (strcmp(udev_device_get_action(dev), "remove") == 0) { udev_device_read_db(dev); udev_device_delete_db(dev); |