summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-12-10 13:35:47 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-12-10 13:35:47 -0500
commit4f8b86e307ca88d842d1d57f38a89efd95fd74d2 (patch)
treec2672bbd3eb440d11afe22e72bbcdabe74dd751a
parentb7cac52779d52eff6ed03103922ffe1208a7baa9 (diff)
dissect: assume GPT_ROOT_SECONDARY_VERITY is defined when GPT_ROOT_SECONDARY is
We define those macros, and there's no reason to have one without the other.
-rw-r--r--src/shared/dissect-image.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index 257af78781..d3ba9b9dde 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -372,9 +372,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
designator = PARTITION_ROOT;
architecture = native_architecture();
rw = !(flags & GPT_FLAG_READ_ONLY);
- }
-#ifdef GPT_ROOT_NATIVE_VERITY
- else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) {
+ } else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) {
m->can_verity = true;
@@ -388,7 +386,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
rw = false;
}
#endif
-#endif
#ifdef GPT_ROOT_SECONDARY
else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY)) {
@@ -399,9 +396,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
designator = PARTITION_ROOT_SECONDARY;
architecture = SECONDARY_ARCHITECTURE;
rw = !(flags & GPT_FLAG_READ_ONLY);
- }
-#ifdef GPT_ROOT_SECONDARY_VERITY
- else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) {
+ } else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) {
m->can_verity = true;
@@ -415,7 +410,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
rw = false;
}
#endif
-#endif
else if (sd_id128_equal(type_id, GPT_SWAP)) {
designator = PARTITION_SWAP;
fstype = "swap";