X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevadm-trigger.c;h=15e7dc17fb88d7b0da4e20f3a6946063d9012983;hb=1d59ba40772517ad92212c89f34529c943c9a849;hp=8d25f923995bfa66733c4bddc41cc2e05c935cf1;hpb=13ddea815496b32bd0ae0a648cdc50af28d69bb1;p=elogind.git diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c index 8d25f9239..15e7dc17f 100644 --- a/udev/udevadm-trigger.c +++ b/udev/udevadm-trigger.c @@ -79,16 +79,16 @@ static int scan_failed(struct udev_enumerate *udev_enumerate) int udevadm_trigger(struct udev *udev, int argc, char *argv[]) { static const struct option options[] = { - { "verbose", 0, NULL, 'v' }, - { "dry-run", 0, NULL, 'n' }, - { "type", 1, NULL, 't' }, - { "retry-failed", 0, NULL, 'F' }, - { "action", 1, NULL, 'c' }, - { "subsystem-match", 1, NULL, 's' }, - { "subsystem-nomatch", 1, NULL, 'S' }, - { "attr-match", 1, NULL, 'a' }, - { "attr-nomatch", 1, NULL, 'A' }, - { "help", 0, NULL, 'h' }, + { "verbose", no_argument, NULL, 'v' }, + { "dry-run", no_argument, NULL, 'n' }, + { "type", required_argument, NULL, 't' }, + { "retry-failed", no_argument, NULL, 'F' }, + { "action", required_argument, NULL, 'c' }, + { "subsystem-match", required_argument, NULL, 's' }, + { "subsystem-nomatch", required_argument, NULL, 'S' }, + { "attr-match", required_argument, NULL, 'a' }, + { "attr-nomatch", required_argument, NULL, 'A' }, + { "help", no_argument, NULL, 'h' }, {} }; enum { @@ -156,7 +156,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) val[0] = 0; val = &val[1]; } - udev_enumerate_add_match_attr(udev_enumerate, attr, val); + udev_enumerate_add_match_sysattr(udev_enumerate, attr, val); break; case 'A': util_strlcpy(attr, optarg, sizeof(attr)); @@ -165,23 +165,23 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[]) val[0] = 0; val = &val[1]; } - udev_enumerate_add_nomatch_attr(udev_enumerate, attr, val); + udev_enumerate_add_nomatch_sysattr(udev_enumerate, attr, val); break; case 'h': printf("Usage: udevadm trigger OPTIONS\n" " --verbose print the list of devices while running\n" " --dry-run do not actually trigger the events\n" " --type= type of events to trigger\n" - " devices sys devices\n" + " devices sys devices (default)\n" " subsystems sys subsystems and drivers\n" " failed trigger only the events which have been\n" " marked as failed during a previous run\n" + " --action= event action value, default is \"add\"\n" " --subsystem-match= trigger devices from a matching subystem\n" " --subsystem-nomatch= exclude devices from a matching subystem\n" " --attr-match=]> trigger devices with a matching attribute\n" " --attr-nomatch=]> exclude devices with a matching attribute\n" - " --help print this text\n" - "\n"); + " --help\n\n"); goto exit; default: goto exit;