summaryrefslogtreecommitdiffstats
path: root/vold/mmc.c
diff options
context:
space:
mode:
authorBen Winslow <rain@bluecherry.net>2009-08-15 09:52:10 -0400
committerBen Winslow <rain@bluecherry.net>2009-08-15 10:09:34 -0400
commit227c74af84f6612559bfb3dceeac324c8ef30870 (patch)
tree4e05408fb737d376ba432399673e5a576820a81d /vold/mmc.c
parent1f7aceb2229e76678f9878d4682f2a7c7048ea6f (diff)
downloadsystem_core-227c74af84f6612559bfb3dceeac324c8ef30870.zip
system_core-227c74af84f6612559bfb3dceeac324c8ef30870.tar.gz
system_core-227c74af84f6612559bfb3dceeac324c8ef30870.tar.bz2
vold: Check partitions 1-4 instead of 0-3
In mmc_bootstrap_mmcblk, bootstrap partitions 1-4 instead of 0-3, since that's how the kernel labels them. Additionally, use the NDOSPART constant from diskmbr.h instead of hardcoding 4 when scanning partitions.
Diffstat (limited to 'vold/mmc.c')
-rw-r--r--vold/mmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vold/mmc.c b/vold/mmc.c
index cbddb92..fcf7c2f 100644
--- a/vold/mmc.c
+++ b/vold/mmc.c
@@ -25,6 +25,7 @@
#include "vold.h"
#include "mmc.h"
#include "media.h"
+#include "diskmbr.h" /* for NDOSPART */
#define DEBUG_BOOTSTRAP 0
@@ -233,7 +234,7 @@ static int mmc_bootstrap_mmcblk(char *devpath)
*mmcblk_devname != '/'; mmcblk_devname--);
mmcblk_devname++;
- for (part_no = 0; part_no < 4; part_no++) {
+ for (part_no = 1; part_no <= NDOSPART; part_no++) {
char part_file[255];
sprintf(part_file, "/sys%s/%sp%d", devpath, mmcblk_devname, part_no);
if (!access(part_file, F_OK)) {