udevadm-trigger: reject invalid wait-daemon timeout
Return from argument parsing when --wait-daemon= cannot be parsed.
This matches the other timeout options.
Reproducer:
udevadm trigger --dry-run --wait-daemon=bad
Before:
Failed to parse timeout value 'bad', ignoring: Invalid argument
Follow-up:
2001622c58
This commit is contained in:
@@ -469,7 +469,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
if (opts.arg) {
|
||||
r = parse_sec(opts.arg, &arg_ping_timeout_usec);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to parse timeout value '%s', ignoring: %m", opts.arg);
|
||||
return log_error_errno(r, "Failed to parse timeout value '%s': %m", opts.arg);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user