]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: drop redundant check
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Sep 2021 09:29:19 +0000 (11:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Sep 2021 12:15:46 +0000 (14:15 +0200)
We already check whether we discovered a /usr verity partition without a
/usr partition when initially mangling the partitions, a bunch of lines
further up, no need to repeat this here.

src/shared/dissect-image.c

index 3279c843ecfc1481e9133c8aefb55fb6e851d0a3..8a139d4f8c665f4d718b59aef057a1883d14d2d2 100644 (file)
@@ -1390,10 +1390,6 @@ int dissect_image(
             !(m->partitions[PARTITION_ROOT].found || (m->partitions[PARTITION_USR].found && FLAGS_SET(flags, DISSECT_IMAGE_USR_NO_ROOT))))
                 return -ENXIO;
 
-        /* Refuse if we found a verity partition for /usr but no matching file system partition */
-        if (!m->partitions[PARTITION_USR].found && m->partitions[PARTITION_USR_VERITY].found)
-                return -EADDRNOTAVAIL;
-
         /* Combinations of verity /usr with verity-less root is OK, but the reverse is not */
         if (m->partitions[PARTITION_ROOT_VERITY].found && m->partitions[PARTITION_USR].found && !m->partitions[PARTITION_USR_VERITY].found)
                 return -EADDRNOTAVAIL;