mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
fix device node deletion
Signed-off-by: Michael Thayer <michael.thayer@sun.com>
This commit is contained in:
parent
c0b19a1717
commit
c00b776880
@ -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);
|
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);
|
info(udev, "static device entry found '%s', skip removal\n", devnode);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user