Skip to content

Commit

Permalink
core/main: also check the argument terminator
Browse files Browse the repository at this point in the history
For future-proof reasons, in case we will add
another option that starts with --deserialize.

Addresses systemd/systemd@4f44d2c#r107285603

(cherry picked from commit 09567df)
(cherry picked from commit ed18c2a)
  • Loading branch information
YHNdnzj authored and bluca committed Apr 4, 2023
1 parent b1ce97c commit f367835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f367835

Please sign in to comment.