From ba4624ff6cd4c8cf0ca4f16759187fee73e2dbfc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Jun 2025 10:45:47 +0200 Subject: [PATCH] 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. --- src/nspawn/nspawn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index e3ffc8c41d..f0cfd4f1aa 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;