[PATCH udev-git-20100430] Fix device node deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



udev-152 and -153 do not remove device nodes again when a USB device is
unplugged, instead printing the log message 'static device entry found
-- not deleting'.  I believe that the patch below against current udev
git will fix this issue.

Signed-off-by: Michael Thayer <michael.thayer@xxxxxxx>
---
--- a/udev/udev-node.c	2010-04-30 00:36:12.571596487 +0200
+++ b/udev/udev-node.c	2010-04-30 00:36:53.871702361 +0200
@@ -428,7 +428,7 @@
 	}
 
 	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;
 	}
-- 
Sun Microsystems GmbH        Michael Thayer
Werkstrasse 24               VirtualBox engineer
71384 Weinstadt, Germany     mailto:michael.thayer@xxxxxxx

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Jürgen Kunz

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux