From: Michael Thayer Date: Sat, 1 May 2010 15:28:08 +0000 (+0200) Subject: fix device node deletion X-Git-Tag: 174~510 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c00b776880142a17de001e5df4f27283c9f0d279;p=systemd fix device node deletion Signed-off-by: Michael Thayer --- diff --git a/udev/udev-node.c b/udev/udev-node.c index 5c1b04b8..780cd707 100644 --- a/udev/udev-node.c +++ b/udev/udev-node.c @@ -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; }