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.
This commit is contained in:
Lennart Poettering
2021-09-10 14:15:22 +02:00
parent a0bff7ea4c
commit e0d53d5291
+1 -1
View File
@@ -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),