summaryrefslogtreecommitdiffstats
path: root/common/partitions.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-16 14:01:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-16 14:01:34 +0100
commit856f60dbd157126241cf9033514137849bb5ca22 (patch)
treefca1784ef63b89a78127a0f4d1340f90eedd6848 /common/partitions.c
parentec78bea331e195fff267ae949cee4777ef1add56 (diff)
parentf4ca20c4d27751ee749f382cfd4949d825534fce (diff)
downloadbarebox-856f60dbd157126241cf9033514137849bb5ca22.tar.gz
Merge branch 'for-next/misc'
Conflicts: commands/Makefile 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 0e42937..24310a3 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;
}