[dm-devel] [PATCH 15/32] kpartx: remove duplicated gpt validation check
Benjamin Marzinski
bmarzins at redhat.com
Wed Aug 1 20:57:01 UTC 2018
The identical check exists twice in a row.
Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
---
kpartx/gpt.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/kpartx/gpt.c b/kpartx/gpt.c
index 6ef20f9..e31611a 100644
--- a/kpartx/gpt.c
+++ b/kpartx/gpt.c
@@ -348,16 +348,6 @@ is_gpt_valid(int fd, uint64_t lba,
return 0;
}
-
- /* Check that sizeof_partition_entry has the correct value */
- if (__le32_to_cpu((*gpt)->sizeof_partition_entry) != sizeof(gpt_entry)) {
- // printf("GUID partition entry size check failed.\n");
- free(*gpt);
- *gpt = NULL;
- return 0;
- }
-
-
if (!(*ptes = alloc_read_gpt_entries(fd, *gpt))) {
free(*gpt);
*gpt = NULL;
--
2.7.4
More information about the dm-devel
mailing list