]> err.no Git - systemd/commitdiff
fix device node deletion
authorMichael Thayer <Michael.Thayer@sun.com>
Sat, 1 May 2010 15:28:08 +0000 (17:28 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 1 May 2010 15:29:24 +0000 (17:29 +0200)
Signed-off-by: Michael Thayer <michael.thayer@sun.com>
udev/udev-node.c

index 5c1b04b86c88bb150899c8c8e46d121379538c04..780cd707c799434fdc15c131710d8360a4a580ae 100644 (file)
@@ -428,7 +428,7 @@ int udev_node_remove(struct udev_device *dev)
        }
 
        util_strscpyl(filename, sizeof(filename), LIBEXECDIR "/devices", &devnode[strlen(udev_get_dev_path(udev))], NULL);
-       if (stat(filename, &stats) == 0 || stats.st_rdev == udev_device_get_devnum(dev)) {
+       if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) {
                info(udev, "static device entry found '%s', skip removal\n", devnode);
                goto out;
        }