All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] don't init namedev on remove
Date: Mon, 22 Mar 2004 23:31:41 +0000	[thread overview]
Message-ID: <20040322233141.GA23592@vrfy.org> (raw)

[-- 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:

             reply	other threads:[~2004-03-22 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 23:31 Kay Sievers [this message]
2004-03-23 18:56 ` [PATCH] don't init namedev on remove Greg KH

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=20040322233141.GA23592@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.