don't init namedev on remove
PATCH 1/1 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 :)
Kay
===== udev.c 1.53 vs edited =====
udev.c +10 -11
@@ -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:
Quoted 3 lines · Kay Sievers
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 :)
Heh, nice patch. Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel