* [PATCH] don't init namedev on remove
@ 2004-03-22 23:31 Kay Sievers
2004-03-23 18:56 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Kay Sievers @ 2004-03-22 23:31 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
Is there any reason to parse the rules for a remove event?
Without it, our test script needs only 2.1 seconds instead of 2.5,
so we have 19 percent more time for testing now :)
Kay
[-- Attachment #2: 01-nonamedev.patch --]
[-- Type: text/plain, Size: 796 bytes --]
===== udev.c 1.53 vs edited =====
--- 1.53/udev.c Wed Mar 17 23:40:12 2004
+++ edited/udev.c Tue Mar 23 00:22:47 2004
@@ -140,19 +140,18 @@
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
- /* initialize the naming deamon */
- namedev_init();
-
- if (strcmp(action, "add") == 0)
+ if (strcmp(action, "add") == 0) {
+ namedev_init();
retval = udev_add_device(devpath, subsystem, 0);
-
- else if (strcmp(action, "remove") == 0)
- retval = udev_remove_device(devpath, subsystem);
-
- else {
- dbg("unknown action '%s'", action);
- retval = -EINVAL;
+ } else {
+ if (strcmp(action, "remove") == 0) {
+ retval = udev_remove_device(devpath, subsystem);
+ } else {
+ dbg("unknown action '%s'", action);
+ retval = -EINVAL;
+ }
}
+
udevdb_exit();
exit_sysbus:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-23 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-22 23:31 [PATCH] don't init namedev on remove Kay Sievers
2004-03-23 18:56 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).