1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

fix device node deletion

Signed-off-by: Michael Thayer <michael.thayer@sun.com>
This commit is contained in:
Michael Thayer 2010-05-01 17:28:08 +02:00 committed by Kay Sievers
parent c0b19a1717
commit c00b776880

View 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;
}