From: Michael Thayer <Michael.Thayer@Sun.COM>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH udev-git-20100430] Fix device node deletion
Date: Thu, 29 Apr 2010 22:53:51 +0000 [thread overview]
Message-ID: <1272581631.3865.20.camel@michael-laptop> (raw)
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@sun.com>
---
--- 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@sun.com
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Jürgen Kunz
next reply other threads:[~2010-04-29 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 22:53 Michael Thayer [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-01 15:32 [PATCH udev-git-20100430] Fix device node deletion Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272581631.3865.20.camel@michael-laptop \
--to=michael.thayer@sun.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox