diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-05-03 17:17:35 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-05-03 20:52:19 +0100 |
commit | ea0f3289a288affd5f13c83849b984c8fad63e90 (patch) | |
tree | f8e8d64a945e5525053e4fc650b91310f4ab6c72 /src/core/scope.c | |
parent | 64ff6ad494477e4ad87fb02335db5ff17bd21d07 (diff) | |
download | systemd-ea0f3289a288affd5f13c83849b984c8fad63e90.tar.gz |
mount-util: simplify mount_switch_root() a bit
There's no need to fchdir() out of the rootfs and back into it around
the umount2(), hence don't.
This brings the logic closer to what the pivot_root() man page suggests.
While we are at it, always operate based on fds, once we opened the
original dir, and pass the path string along only for generating
messages (i.e. as "decoration").
Add tests for both code paths: the pivot_root() one and the MS_MOUNT.
Diffstat (limited to 'src/core/scope.c')
0 files changed, 0 insertions, 0 deletions