aboutsummaryrefslogtreecommitdiffstats
path: root/vold/blkdev.c
diff options
context:
space:
mode:
authorEthan.Du <a7233c@motorola.com>2009-09-02 14:04:26 +0800
committerSan Mehat <san@google.com>2009-09-24 10:16:15 -0700
commit3afe20b0beb7e274eee195de436211a3e8d1b0ce (patch)
treef37ea0a33afdec107d458acd7997117b317742c2 /vold/blkdev.c
parentff7d5835d91b979836b66dc42fac69adf2c6c3a3 (diff)
downloadsystem_core-3afe20b0beb7e274eee195de436211a3e8d1b0ce.tar.gz
system_core-3afe20b0beb7e274eee195de436211a3e8d1b0ce.tar.bz2
system_core-3afe20b0beb7e274eee195de436211a3e8d1b0ce.zip
vold: Add support for /dev/block/mmcblk1
Signed-off-by: Ethan.Du <a7233c@motorola.com> Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'vold/blkdev.c')
-rw-r--r--vold/blkdev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vold/blkdev.c b/vold/blkdev.c
index e10eafc8..22d000e5 100644
--- a/vold/blkdev.c
+++ b/vold/blkdev.c
@@ -32,6 +32,7 @@
#include "vold.h"
#include "blkdev.h"
#include "diskmbr.h"
+#include "media.h"
#define DEBUG_BLKDEV 0
@@ -132,7 +133,12 @@ int blkdev_refresh(blkdev_t *blk)
}
} else if (blk->type == blkdev_partition) {
struct dos_partition part;
- int part_no = blk->minor -1;
+ int part_no;
+
+ if (blk->media->media_type == media_mmc)
+ part_no = blk->minor % MMC_PARTS_PER_CARD -1;
+ else
+ part_no = blk->minor -1;
if (part_no < 4) {
dos_partition_dec(block + DOSPARTOFF + part_no * sizeof(struct dos_partition), &part);