summaryrefslogtreecommitdiff
path: root/src/gpt-auto-generator
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-23 19:49:13 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-18 14:47:46 +0100
commitc94b2417770625d78705e5f55725f04c26398fce (patch)
tree2cf11d7d197b6168b1d81ca4ea8bba358c2b344d /src/gpt-auto-generator
parent59f13dd6f801b2df4faea277a5de0115ed598e35 (diff)
downloadsystemd-c94b2417770625d78705e5f55725f04c26398fce.tar.gz
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.
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c4
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 28479386b9..425f5421ca 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);