]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: after probing file systems, we still have the chance to not use a...
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Mar 2025 10:45:20 +0000 (11:45 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Apr 2025 21:09:01 +0000 (06:09 +0900)
Just because we found something we should still allow it to not be used,
hence include UNUSED in the found flags.

src/shared/dissect-image.c

index 8ce71423253f98d624d3fdce6cd693394a2fcc20..8c8592cc77f56c26f65a0bfe8923f8fdc57f5fcc 100644 (file)
@@ -404,11 +404,11 @@ static int dissected_image_probe_filesystems(
 
                 if (streq_ptr(p->fstype, "crypto_LUKS")) {
                         m->encrypted = true;
-                        found_flags = PARTITION_POLICY_ENCRYPTED; /* found this one, and its definitely encrypted */
+                        found_flags = PARTITION_POLICY_UNUSED|PARTITION_POLICY_ENCRYPTED; /* found this one, and its definitely encrypted */
                 } else
                         /* found it, but it's definitely not encrypted, hence mask the encrypted flag, but
                          * set all other ways that indicate "present". */
-                        found_flags = PARTITION_POLICY_UNPROTECTED|PARTITION_POLICY_VERITY|PARTITION_POLICY_SIGNED;
+                        found_flags = PARTITION_POLICY_UNUSED|PARTITION_POLICY_UNPROTECTED|PARTITION_POLICY_VERITY|PARTITION_POLICY_SIGNED;
 
                 if (p->fstype && fstype_is_ro(p->fstype))
                         p->rw = false;