summaryrefslogtreecommitdiffstats
path: root/common/partitions/dos.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-09-13 15:08:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-14 14:04:20 +0200
commit1369bfd44f2393893036ee50f81e0104f7fb6416 (patch)
treef5eab85de4e8529904ec012bf4c7668d37d444da /common/partitions/dos.c
parent51dce5facb4d1a6f182ede9654b25c2e83878aee (diff)
downloadbarebox-1369bfd44f2393893036ee50f81e0104f7fb6416.tar.gz
cdev: store dos partition type in struct cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions/dos.c')
-rw-r--r--common/partitions/dos.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/partitions/dos.c b/common/partitions/dos.c
index 29f1375..31b1ed6 100644
--- a/common/partitions/dos.c
+++ b/common/partitions/dos.c
@@ -138,10 +138,13 @@ static void dos_partition(void *buf, struct block_device *blk,
for (i = 0; i < 4; i++) {
pentry.first_sec = get_unaligned_le32(&table[i].partition_start);
pentry.size = get_unaligned_le32(&table[i].partition_size);
+ pentry.dos_partition_type = table[i].type;
if (pentry.first_sec != 0) {
- pd->parts[pd->used_entries].first_sec = pentry.first_sec;
- pd->parts[pd->used_entries].size = pentry.size;
+ int n = pd->used_entries;
+ pd->parts[n].first_sec = pentry.first_sec;
+ pd->parts[n].size = pentry.size;
+ pd->parts[n].dos_partition_type = pentry.dos_partition_type;
pd->used_entries++;
} else {
dev_dbg(blk->dev, "Skipping empty partition %d\n", i);