summaryrefslogtreecommitdiffstats
path: root/common/partitions.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-27 20:47:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-28 12:45:39 +0200
commitcdd4b4f075592738feb0205b6e04c45b9c997bed (patch)
treea477a6e94e51a7a6af3c02dcdf8e1b1b7c25c11a /common/partitions.c
parentee3e50f23f60299477ddb125ef39108faaba5756 (diff)
downloadbarebox-cdd4b4f075592738feb0205b6e04c45b9c997bed.tar.gz
dos partitions: enable disk size guessing only for bios disks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions.c')
-rw-r--r--common/partitions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/partitions.c b/common/partitions.c
index 74b4f12..c5bce6e 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -119,7 +119,7 @@ static void __maybe_unused try_dos_partition(struct block_device *blk,
table = (struct partition_entry *)&buffer[446];
/* valid for x86 BIOS based disks only */
- if (blk->num_blocks == 0)
+ if (IS_ENABLED(CONFIG_DISK_BIOS) && blk->num_blocks == 0)
blk->num_blocks = disk_guess_size(blk->dev, table);
for (i = 0; i < 4; i++) {