summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-08-11 14:34:32 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-08-11 14:34:32 +0200
commitebd189621f4b7e0034ea7a7067199bc9a0f28145 (patch)
tree0aa9b39dd7ab5c545fb1294bbea172da7493541b /udev/udev-event.c
parentce9a42bec40330d0a0c83d21f07177cb2d08f1ac (diff)
do not rename the database on device rename
Harald Hoyer discovered some incorrect behavior while debugging problems with network interface renaming: Udev events might be queued for devices which are renamed. A new device registered the same time may claime the old name and create a database entry for it. The current rename logic would move over this databse entry to the wrong device.
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 1ecf82423f..9b5326bf22 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -534,14 +534,6 @@ 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_sysname_old(dev) != NULL &&
- strcmp(udev_device_get_sysname_old(dev), udev_device_get_sysname(dev)) != 0) {
- udev_device_rename_db(dev);
- info(event->udev, "moved database from '%s:%s' to '%s:%s'\n",
- udev_device_get_subsystem(dev), udev_device_get_sysname_old(dev),
- udev_device_get_subsystem(dev), udev_device_get_sysname(dev));
- }
-
if (strcmp(udev_device_get_action(dev), "remove") == 0) {
udev_device_read_db(dev);
udev_device_delete_db(dev);