diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-05-19 15:48:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-06-02 16:49:39 +0200 |
commit | 2932161bf6d9a8c127da00c9032e7e449222c9ea (patch) | |
tree | 037c22f801fb529674bd1b82573968b875f11665 /src/core | |
parent | switch-root: always use MS_BIND to move api vfs over (diff) | |
download | systemd-2932161bf6d9a8c127da00c9032e7e449222c9ea.tar.xz systemd-2932161bf6d9a8c127da00c9032e7e449222c9ea.zip |
switch-root: introduce SwitchRootFlags flags parameter to switch_root()
Let's replace the current boolean param with a proper flags param. With
a single flag this doesn't appear to make much sense, though it does
already make things more readable I think.
However, once we add a second flag, it starts to make more sense.
Also, while we are at it, condition the "istmp" determinaton with this
flag too, since we only need it when the flag is set.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c index 28cfca25b3..f067b13fff 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1840,7 +1840,7 @@ static int do_reexecute( if (switch_root_dir) { r = switch_root(/* new_root= */ switch_root_dir, /* old_root_after= */ NULL, - /* destroy_old_root= */ objective == MANAGER_SWITCH_ROOT); + /* flags= */ objective == MANAGER_SWITCH_ROOT ? SWITCH_ROOT_DESTROY_OLD_ROOT : 0); if (r < 0) log_error_errno(r, "Failed to switch root, trying to continue: %m"); } |