summaryrefslogtreecommitdiff
path: root/libudev/libudev-queue-private.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 /libudev/libudev-queue-private.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 'libudev/libudev-queue-private.c')
-rw-r--r--libudev/libudev-queue-private.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c
index 6109837f7e..06dc2f5e0e 100644
--- a/libudev/libudev-queue-private.c
+++ b/libudev/libudev-queue-private.c
@@ -423,17 +423,6 @@ static void update_failed(struct udev_queue_export *udev_queue_export,
break;
case DEVICE_FINISHED:
- if (udev_device_get_sysname_old(udev_device) != NULL &&
- strcmp(udev_device_get_sysname_old(udev_device), udev_device_get_sysname(udev_device)) != 0) {
- /* "move" event - rename failed file to current name, do not delete failed */
- char filename_old[UTIL_PATH_SIZE];
-
- util_strscpyl(filename_old, sizeof(filename_old), udev_get_dev_path(udev), "/.udev/failed/",
- udev_device_get_subsystem(udev_device), ":", udev_device_get_sysname_old(udev_device), NULL);
- if (rename(filename_old, filename) == 0)
- info(udev, "renamed devpath, moved failed state of '%s' to %s'\n",
- udev_device_get_devpath_old(udev_device), udev_device_get_devpath(udev_device));
- }
break;
}