From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 22 Mar 2004 23:31:41 +0000 Subject: [PATCH] don't init namedev on remove Message-Id: <20040322233141.GA23592@vrfy.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" List-Id: To: linux-hotplug@vger.kernel.org --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="01-nonamedev.patch" ===== 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: --ibTvN161/egqYuK8-- ------------------------------------------------------- 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_id=1470&alloc_id=3638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel