From: Lennart Poettering Date: Wed, 8 Sep 2021 15:29:06 +0000 (+0200) Subject: dissect-image: also derive read-only mode from fstype in non-partitioned mode X-Git-Tag: v250-rc1~701^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0d53d529159c7c23b008028480d9f32adbf11d7;p=thirdparty%2Fsystemd.git dissect-image: also derive read-only mode from fstype in non-partitioned mode For the GPT partitioned logic we also consult the fstype to determine whether a partition is read-only (i.e. squashfs is already read-only). For the non-partitioned mode we didn't do that so far. Fix that. --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 8d5c7e08e35..4f398316ae3 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -816,7 +816,7 @@ int dissect_image( m->partitions[PARTITION_ROOT] = (DissectedPartition) { .found = true, - .rw = !m->verity_ready, + .rw = !m->verity_ready && !fstype_is_ro(fstype), .partno = -1, .architecture = _ARCHITECTURE_INVALID, .fstype = TAKE_PTR(t),