From: Lennart Poettering Date: Mon, 16 Jun 2025 08:45:47 +0000 (+0200) Subject: nspawn: fix parser of --notify-ready= X-Git-Tag: v258-rc1~140^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba4624ff6cd4c8cf0ca4f16759187fee73e2dbfc;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index e3ffc8c41d9..f0cfd4f1aad 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -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;