diff options
author | Leif Middelschulte <leif.middelschulte@klsmartin.com> | 2019-10-14 14:57:14 +0200 |
---|---|---|
committer | Leif Middelschulte <leif.middelschulte@klsmartin.com> | 2019-10-14 14:57:14 +0200 |
commit | ee7d0f92357c5235b71205f8c8a5d1cdc8efd4e0 (patch) | |
tree | 6a108e52bbd6352f53c6d97d1bce23c547579ae0 /common/partitions | |
parent | 59523901d29386f0bf86750b6bf8c8222ab22a33 (diff) | |
download | barebox-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/partitions')
-rw-r--r-- | common/partitions/efi.c | 2 |
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; } |