- if (!strncmp(arg, "log_priority=", strlen("log_priority="))) {
- udev_ctrl_send_set_log_level(uctrl, util_log_priority(&arg[strlen("log_priority=")]));
- rc = 0;
- goto exit;
- } else if (!strcmp(arg, "stop_exec_queue")) {
- udev_ctrl_send_stop_exec_queue(uctrl);
- rc = 0;
- goto exit;
- } else if (!strcmp(arg, "start_exec_queue")) {
- udev_ctrl_send_start_exec_queue(uctrl);
- rc = 0;
- goto exit;
- } else if (!strcmp(arg, "reload_rules")) {
- udev_ctrl_send_reload_rules(uctrl);
- rc = 0;
- goto exit;
- } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) {
- udev_ctrl_send_set_max_childs(uctrl, strtoul(&arg[strlen("max_childs=")], NULL, 0));
- rc = 0;
- goto exit;
- } else if (!strncmp(arg, "env", strlen("env"))) {
- udev_ctrl_send_set_env(uctrl, &arg[strlen("env=")]);
+ seconds = atoi(optarg);
+ if (seconds >= 0)
+ timeout = seconds;
+ else
+ fprintf(stderr, "invalid timeout value\n");
+ break;
+ }
+ case 'h':
+ print_help();