chiark / gitweb /
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 5c1b04b..780cd70 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;
        }