*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{ "log-priority", required_argument, NULL, 'l' },
{ "stop-exec-queue", no_argument, NULL, 's' },
{ "start-exec-queue", no_argument, NULL, 'S' },
{ "log-priority", required_argument, NULL, 'l' },
{ "stop-exec-queue", no_argument, NULL, 's' },
{ "start-exec-queue", no_argument, NULL, 'S' },
{ "reload-rules", no_argument, NULL, 'R' },
{ "property", required_argument, NULL, 'p' },
{ "env", required_argument, NULL, 'p' },
{ "reload-rules", no_argument, NULL, 'R' },
{ "property", required_argument, NULL, 'p' },
{ "env", required_argument, NULL, 'p' },
- { "max-childs", required_argument, NULL, 'm' },
+ { "children-max", required_argument, NULL, 'm' },
+ { "timeout", required_argument, NULL, 't' },
{ "help", no_argument, NULL, 'h' },
{}
};
{ "help", no_argument, NULL, 'h' },
{}
};
- option = getopt_long(argc, argv, "l:sSRp:m:M:h", options, NULL);
+ option = getopt_long(argc, argv, "el:sSRp:m:h", options, NULL);
i = util_log_priority(optarg);
if (i < 0) {
fprintf(stderr, "invalid number '%s'\n", optarg);
i = util_log_priority(optarg);
if (i < 0) {
fprintf(stderr, "invalid number '%s'\n", optarg);
case 'p':
if (strchr(optarg, '=') == NULL) {
fprintf(stderr, "expect <KEY>=<value> instead of '%s'\n", optarg);
case 'p':
if (strchr(optarg, '=') == NULL) {
fprintf(stderr, "expect <KEY>=<value> instead of '%s'\n", optarg);
i = strtoul(optarg, &endp, 0);
if (endp[0] != '\0' || i < 1) {
fprintf(stderr, "invalid number '%s'\n", optarg);
i = strtoul(optarg, &endp, 0);
if (endp[0] != '\0' || i < 1) {
fprintf(stderr, "invalid number '%s'\n", optarg);
- if (rc == 1)
- err(udev, "unrecognized command\n");
-exit:
+ if (argv[optind] != NULL)
+ fprintf(stderr, "unknown option\n");
+ else if (optind == 1)
+ fprintf(stderr, "missing option\n");
+out: