summaryrefslogtreecommitdiffstats
path: root/common/partitions.c
diff options
context:
space:
mode:
authorFranck Jullien <franck.jullien@gmail.com>2012-10-11 22:45:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-12 10:08:19 +0200
commite5a8c1e2324acde9740ae28febf24ec8634f9448 (patch)
treebef5723974ba030a61a09c03f7af61cba571be82 /common/partitions.c
parent247022ec920dcd9d5a9750eee71a157ce4a65ad6 (diff)
downloadbarebox-e5a8c1e2324acde9740ae28febf24ec8634f9448.tar.gz
common/partitions.c: make use of is_fat_or_mbr
Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions.c')
-rw-r--r--common/partitions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/partitions.c b/common/partitions.c
index cee0a65..5682b51 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -28,6 +28,7 @@
#include <asm/unaligned.h>
#include <disks.h>
#include <dma.h>
+#include <filetype.h>
struct partition {
uint64_t first_sec;
@@ -85,7 +86,7 @@ static void __maybe_unused try_dos_partition(struct block_device *blk,
goto on_error;
}
- if ((buffer[510] != 0x55) || (buffer[511] != 0xAA)) {
+ if (is_fat_or_mbr(buffer, NULL) != filetype_mbr) {
dev_info(blk->dev, "No partition table found\n");
goto on_error;
}