diff options
author | 2018-11-23 19:49:13 +0100 | |
---|---|---|
committer | 2018-12-18 14:47:46 +0100 | |
commit | c94b2417770625d78705e5f55725f04c26398fce (patch) | |
tree | 2cf11d7d197b6168b1d81ca4ea8bba358c2b344d | |
parent | remount-fs: optionally remount / writable, if we are told through an env var (diff) | |
download | systemd-c94b2417770625d78705e5f55725f04c26398fce.tar.gz systemd-c94b2417770625d78705e5f55725f04c26398fce.tar.bz2 systemd-c94b2417770625d78705e5f55725f04c26398fce.zip |
gpt-auto: make arg_root_rw a tri-state
No change in behaviour, but let's track whether ro or rw are specified
on the kernel cmdline at all.
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 28479386b..425f5421c 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -39,7 +39,7 @@ static const char *arg_dest = NULL; static bool arg_enabled = true; static bool arg_root_enabled = true; -static bool arg_root_rw = false; +static int arg_root_rw = -1; static int add_cryptsetup(const char *id, const char *what, bool rw, bool require, char **device) { _cleanup_free_ char *e = NULL, *n = NULL, *d = NULL, *id_escaped = NULL, *what_escaped = NULL; @@ -640,7 +640,7 @@ static int add_root_mount(void) { "/dev/gpt-auto-root", in_initrd() ? "/sysroot" : "/", NULL, - arg_root_rw, + arg_root_rw > 0, NULL, "Root Partition", in_initrd() ? SPECIAL_INITRD_ROOT_FS_TARGET : SPECIAL_LOCAL_FS_TARGET); |