From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] add options to udevtrigger to control scanning
Date: Thu, 31 Aug 2006 00:41:38 +0000 [thread overview]
Message-ID: <20060831004138.GA28528@kroah.com> (raw)
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
next reply other threads:[~2006-08-31 0:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 0:41 Greg KH [this message]
2006-08-31 8:46 ` [PATCH] add options to udevtrigger to control scanning 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
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=20060831004138.GA28528@kroah.com \
--to=greg@kroah.com \
--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.