From: Lennart Poettering Date: Fri, 23 Nov 2018 18:49:13 +0000 (+0100) Subject: gpt-auto: make arg_root_rw a tri-state X-Git-Tag: v240~18^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c94b2417770625d78705e5f55725f04c26398fce;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 28479386b9b..425f5421caa 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);