]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt: we actually honour the ReadOnly= flag on XBOOTLDR partitions too
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2021 15:38:21 +0000 (17:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 Apr 2021 07:34:41 +0000 (09:34 +0200)
The partition type is defined in our Discoverable Partition Spec, and we
honour the flag for it, hence allow setting it too.

src/shared/gpt.c

index 6b1a5761388a04a2bdbeb289887d30d408eff983..69da6c72806b2092bbf32a51263b04dd7fb85cd1 100644 (file)
@@ -158,7 +158,8 @@ bool gpt_partition_type_knows_read_only(sd_id128_t id) {
                                 GPT_HOME,
                                 GPT_SRV,
                                 GPT_VAR,
-                                GPT_TMP) ||
+                                GPT_TMP,
+                                GPT_XBOOTLDR) ||
                 gpt_partition_type_is_root_verity(id) || /* pretty much implied, but let's set the bit to make things really clear */
                 gpt_partition_type_is_usr_verity(id);    /* ditto */
 }