summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-19 18:57:28 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-19 18:57:28 +0200
commit6252f9e732c827defdac38e2eccab0657492d9c9 (patch)
treed5c9da616a7bcdb360cfd5bc4b0f569eb0b2ccea
parent9355f324e11c4b9ffdbfe2eaf73891ba01b80a0e (diff)
delete only device nodes, not symlinks when deleting a devtmpfs node
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550152
-rw-r--r--udev/udev-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 26939e75db..b2e1baee1f 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -647,7 +647,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules)
char filename[UTIL_PATH_SIZE];
util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", udev_device_get_knodename(dev), NULL);
- if (stat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) {
+ if (lstat(filename, &stats) == 0 && stats.st_rdev == udev_device_get_devnum(dev)) {
info(event->udev, "remove kernel created node '%s'\n", udev_device_get_knodename(dev));
util_unlink_secure(event->udev, filename);
util_delete_path(event->udev, filename);