summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@klsmartin.com>2019-10-14 14:57:14 +0200
committerLeif Middelschulte <leif.middelschulte@klsmartin.com>2019-10-14 14:57:14 +0200
commitee7d0f92357c5235b71205f8c8a5d1cdc8efd4e0 (patch)
tree6a108e52bbd6352f53c6d97d1bce23c547579ae0 /common
parent59523901d29386f0bf86750b6bf8c8222ab22a33 (diff)
downloadbarebox-ee7d0f92357c5235b71205f8c8a5d1cdc8efd4e0.tar.gz
barebox-ee7d0f92357c5235b71205f8c8a5d1cdc8efd4e0.tar.xz
common/partitions/efi: fix gpt detection
On some boards (such as i.MX) the buffer might contain both: A barebox image *and* a GPT partition table. Thus, irrelevant filetypes should be ignored.
Diffstat (limited to 'common')
-rw-r--r--common/partitions/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index 3c1077fd0c..f20fd0d9b9 100644
--- a/common/partitions/efi.c
+++ b/common/partitions/efi.c
@@ -369,7 +369,7 @@ static int find_valid_gpt(void *buf, struct block_device *blk, gpt_header **gpt,
lastlba = last_lba(blk);
if (force_gpt) {
/* This will be added to the EFI Spec. per Intel after v1.02. */
- if (file_detect_type(buf, SECTOR_SIZE * 2) != filetype_gpt)
+ if (file_detect_partition_table(buf, SECTOR_SIZE * 2) != filetype_gpt)
goto fail;
}