nspawn: fix parser of --notify-ready=

This switch takes a bool only, not an enum, hence don't claim otherwise
in the error log message.
This commit is contained in:
Lennart Poettering
2025-06-16 10:45:47 +02:00
parent 3779bdd5a3
commit ba4624ff6c

View File

@@ -1332,11 +1332,10 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_NOTIFY_READY:
r = parse_boolean(optarg);
r = parse_boolean_argument("--notify-ready=", optarg, &arg_notify_ready);
if (r < 0)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"%s is not a valid notify mode. Valid modes are: yes, no, and ready.", optarg);
arg_notify_ready = r;
return r;
arg_settings_mask |= SETTING_NOTIFY_READY;
break;