]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/switch-root.h
cryptenroll: allow to use a public key on a token
[thirdparty/systemd.git] / src / shared / switch-root.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
05d3a176 2#pragma once
41669317 3
0c697941
LP
4#include <stdbool.h>
5
2932161b 6typedef enum SwitchRootFlags {
6b219b74
YW
7 SWITCH_ROOT_DESTROY_OLD_ROOT = 1 << 0, /* rm -rf old root when switching – under the condition
8 * that it is backed by non-persistent tmpfs/ramfs/… */
9 SWITCH_ROOT_DONT_SYNC = 1 << 1, /* don't call sync() immediately before switching root */
c2d62118 10 SWITCH_ROOT_RECURSIVE_RUN = 1 << 2, /* move /run/ with MS_REC from old to new root */
2932161b
LP
11} SwitchRootFlags;
12
13int switch_root(const char *new_root, const char *old_root_after, SwitchRootFlags flags);