summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/partitions/gpt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c
index d987236d3..1f75e592c 100644
--- a/libblkid/src/partitions/gpt.c
+++ b/libblkid/src/partitions/gpt.c
@@ -167,7 +167,7 @@ static int is_pmbr_valid(blkid_probe pr, int *has)
if (has)
*has = 0;
if (flags & BLKID_PARTS_FORCE_GPT)
- goto ok; /* skip PMBR check */
+ return 1; /* skip PMBR check */
data = blkid_probe_get_sector(pr, 0);
if (!data) {
@@ -180,8 +180,10 @@ static int is_pmbr_valid(blkid_probe pr, int *has)
goto failed;
for (i = 0, p = mbr_get_partition(data, 0); i < 4; i++, p++) {
- if (p->sys_ind == MBR_GPT_PARTITION)
+ if (p->sys_ind == MBR_GPT_PARTITION) {
+ DBG(LOWPROBE, ul_debug(" #%d valid PMBR partition", i + 1));
goto ok;
+ }
}
failed:
return 0;
@@ -215,6 +217,8 @@ static struct gpt_header *get_gpt_header(
ssz = blkid_probe_get_sectorsize(pr);
+ DBG(LOWPROBE, ul_debug(" checking for GPT header at %ju", lba));
+
/* whole sector is allocated for GPT header */
h = (struct gpt_header *) get_lba_buffer(pr, lba, ssz);
if (!h)