]> err.no Git - systemd/commitdiff
delete only device nodes, not symlinks when deleting a devtmpfs node
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 19 Apr 2010 16:57:28 +0000 (18:57 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 19 Apr 2010 16:57:28 +0000 (18:57 +0200)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550152

udev/udev-event.c

index 26939e75dbbc18e649efbb9c3a04d8454a977901..b2e1baee1f4d5484ef2144b6860ea420b5cee03c 100644 (file)
@@ -647,7 +647,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules)
                                char filename[UTIL_PATH_SIZE];
 
                                util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL);
-                               if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) {
+                               if (lstat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) {
                                        info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev));
                                        util_unlink_secure(event->udev, filename);
                                        util_delete_path(event->udev, filename);