diff options
| author | Ethan.Du <a7233c@motorola.com> | 2009-09-24 10:52:13 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-09-24 10:52:13 -0700 |
| commit | 9e421c9410a1b1ec95db298a23e29fb4dd200ea4 (patch) | |
| tree | e16bd6736cfcfacc3153c868b9f936c6b1fd08ba /vold/blkdev.c | |
| parent | 814215f44e804e198538b9cf679a4d2f1a69d904 (diff) | |
| parent | 3afe20b0beb7e274eee195de436211a3e8d1b0ce (diff) | |
| download | system_core-9e421c9410a1b1ec95db298a23e29fb4dd200ea4.tar.gz system_core-9e421c9410a1b1ec95db298a23e29fb4dd200ea4.tar.bz2 system_core-9e421c9410a1b1ec95db298a23e29fb4dd200ea4.zip | |
am 3afe20b0: vold: Add support for /dev/block/mmcblk1
Merge commit '3afe20b0beb7e274eee195de436211a3e8d1b0ce' into eclair-plus-aosp
* commit '3afe20b0beb7e274eee195de436211a3e8d1b0ce':
vold: Add support for /dev/block/mmcblk1
Diffstat (limited to 'vold/blkdev.c')
| -rw-r--r-- | vold/blkdev.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vold/blkdev.c b/vold/blkdev.c index 2c5681ac..33fed1b8 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 < NDOSPART) { dos_partition_dec(block + DOSPARTOFF + part_no * sizeof(struct dos_partition), &part); |
