[PATCH 3/3] dos partitions: enable disk size guessing only for bios disks

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 28 06:48:47 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/partitions.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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++) {
-- 
1.7.10




More information about the barebox mailing list