[PATCH 08/13] DISK: Add common partition handling for disk like media

Juergen Beisert jbe at pengutronix.de
Mon Nov 21 05:05:30 EST 2011


What about this simple change? As we do always work sequential in barebox it
should work.

diff --git a/common/partitions.c b/common/partitions.c
index f3e0f6f..3ae1cf3 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -207,6 +207,8 @@ int parse_partition_table(struct block_device *blk)
 	int i;
 	int rc = 0;
 
+	pdesc.used_entries = 0;	/* (re-)start with an empty table */
+
 #ifdef CONFIG_PARTITION_DISK_DOS
 	if (pdesc.used_entries == 0)
 		try_dos_partition(blk);

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |



More information about the barebox mailing list