1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

[PATCH] don't init namedev on remove

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 :)
This commit is contained in:
kay.sievers@vrfy.org 2004-03-23 18:54:34 -08:00 committed by Greg KH
parent 4474484153
commit 2a94c8777e

21
udev.c
View File

@ -140,19 +140,18 @@ static int udev_hotplug(void)
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: