summaryrefslogtreecommitdiffstats
path: root/common/partitions.c
diff options
context:
space:
mode:
authorHubert Feurstein <h.feurstein@gmail.com>2013-04-19 10:46:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-29 09:34:13 +0200
commita5e476467995366e9d52741141929404f3877181 (patch)
tree8e207a3412105e6b9ef08212f09b7015cf64ce45 /common/partitions.c
parentc06956e15f8fb32d46e479950719c30bae57e5bb (diff)
downloadbarebox-a5e476467995366e9d52741141929404f3877181.tar.gz
common/partition: check only for partition table types
The detection of the partition table fails when we have a barebox image in the MBR. So check only for partition table types. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions.c')
-rw-r--r--common/partitions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/partitions.c b/common/partitions.c
index dd25160..683b258 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -89,7 +89,7 @@ static struct partition_parser *partition_parser_get_by_filetype(uint8_t *buf)
struct partition_parser *parser;
/* first new partition table as EFI GPT */
- type = file_detect_type(buf, SECTOR_SIZE * 2);
+ type = file_detect_partition_table(buf, SECTOR_SIZE * 2);
list_for_each_entry(parser, &partition_parser_list, list) {
if (parser->type == type)
@@ -100,7 +100,7 @@ static struct partition_parser *partition_parser_get_by_filetype(uint8_t *buf)
* so if EFI GPT not enable take it as MBR
* useful for compatibility
*/
- type = file_detect_type(buf, SECTOR_SIZE);
+ type = file_detect_partition_table(buf, SECTOR_SIZE);
list_for_each_entry(parser, &partition_parser_list, list) {
if (parser->type == type)