summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index f3c2bd2225..3a6c71abe9 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -531,10 +531,12 @@ 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_devpath_old(dev) != NULL) {
- if (udev_device_rename_db(dev, udev_device_get_devpath(dev)) == 0)
- info(event->udev, "moved database from '%s' to '%s'\n",
- udev_device_get_devpath_old(dev), udev_device_get_devpath(dev));
+ 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));
}
/* add device node */