From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 31 Aug 2006 00:41:38 +0000 Subject: [PATCH] add options to udevtrigger to control scanning Message-Id: <20060831004138.GA28528@kroah.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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 but was forward-ported by me to the latest version of udev. Signed-off-by: Greg Kroah-Hartman --- 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&kid0709&bid&3057&dat1642 _______________________________________________ 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