linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add options to udevtrigger to control scanning
@ 2006-08-31  0:41 Greg KH
  2006-08-31  8:46 ` Kay Sievers
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Greg KH @ 2006-08-31  0:41 UTC (permalink / raw)
  To: linux-hotplug

This patch has been in the gentoo tree for a bit.  It modifies
udevtrigger to allow a little more fine grained control for people who
don't want all of the sysfs tree to be scanned by udevtrigger at
startup.

Patch was originally written by Martin Schlemmer <azarah@gentoo.org> but
was forward-ported by me to the latest version of udev.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

--- a/udevtrigger.c
+++ b/udevtrigger.c
@@ -358,6 +358,9 @@ int main(int argc, char *argv[], char *e
 {
 	int i;
 	int failed = 0;
+	int block = 1;
+	int bus = 1;
+	int class = 1;
 
 	logging_init("udevtrigger");
 	udev_config_init();
@@ -373,8 +376,15 @@ int main(int argc, char *argv[], char *e
 			dry_run = 1;
 		} else if (strcmp(arg, "--retry-failed") = 0 || strcmp(arg, "-F") = 0) {
 			failed = 1;
+		} else if (strcmp(arg, "--no-scan-block") = 0) {
+			block = 0;
+		} else if (strcmp(arg, "--no-scan-bus") = 0) {
+			bus = 0;
+		} else if (strcmp(arg, "--no-scan-class") = 0) {
+			class = 0;
 		} else if (strcmp(arg, "--help") = 0 || strcmp(arg, "-h") = 0) {
-			printf("Usage: udevtrigger [--help] [--verbose] [--dry-run] [--retry-failed]\n");
+			printf("Usage: udevtrigger [--no-scan-block] [--no-scan-bus] [--no-scan-class]\n");
+			printf("                   [--help] [--verbose] [--dry-run] [--retry-failed]\n");
 			goto exit;
 		} else {
 			fprintf(stderr, "unrecognized option '%s'\n", arg);
@@ -386,9 +396,12 @@ int main(int argc, char *argv[], char *e
 		scan_failed();
 	else {
 		/* default action */
-		scan_bus();
-		scan_class();
-		scan_block();
+		if (bus)
+			scan_bus();
+		if (class)
+			scan_class();
+		if (block)
+			scan_block();
 	}
 	exec_lists();
 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-09-03  4:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-31  0:41 [PATCH] add options to udevtrigger to control scanning Greg KH
2006-08-31  8:46 ` Kay Sievers
2006-08-31 17:31 ` Greg KH
2006-08-31 17:37 ` Marco d'Itri
2006-08-31 17:52 ` Greg KH
2006-08-31 20:02 ` Scott James Remnant
2006-09-02 17:46 ` Roy Marples
2006-09-03  1:34 ` Kay Sievers
2006-09-03  3:46 ` Greg KH
2006-09-03  4:03 ` 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).