From f3678358a4ff03e0b9fc9d3c69c1eddead989b2a Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 3 Apr 2023 18:42:39 +0800 Subject: [PATCH] core/main: also check the argument terminator For future-proof reasons, in case we will add another option that starts with --deserialize. Addresses https://github.com/systemd/systemd/commit/4f44d2c4f76922a4f48dd4473e6abaca40d7e555#r107285603 (cherry picked from commit 09567df7db75824f1b8bf0b5cc721febda03cb56) (cherry picked from commit ed18c2ab79e8b94182d5dcf31d58457763f3e3e1) --- src/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/main.c b/src/core/main.c index 27caff5377..e4b72c304a 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2658,7 +2658,7 @@ static bool early_skip_setup_check(int argc, char *argv[]) { for (int i = 1; i < argc; i++) if (streq(argv[i], "--switched-root")) return false; /* If we switched root, don't skip the setup. */ - else if (startswith(argv[i], "--deserialize")) + else if (startswith(argv[i], "--deserialize=") || streq(argv[i], "--deserialize")) found_deserialize = true; return found_deserialize; /* When we are deserializing, then we are reexecuting, hence avoid the extensive setup */