kpartx: remove duplicated gpt validation check
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 1 Aug 2018 20:57:01 +0000 (15:57 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 7 Aug 2018 13:30:30 +0000 (15:30 +0200)
The identical check exists twice in a row.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/gpt.c

index 6ef20f9..e31611a 100644 (file)
@@ -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;