diff options
| author | Ben Winslow <rain@bluecherry.net> | 2009-08-15 09:52:10 -0400 |
|---|---|---|
| committer | Ben Winslow <rain@bluecherry.net> | 2009-08-15 10:09:34 -0400 |
| commit | 227c74af84f6612559bfb3dceeac324c8ef30870 (patch) | |
| tree | 4e05408fb737d376ba432399673e5a576820a81d /vold/blkdev.c | |
| parent | 1f7aceb2229e76678f9878d4682f2a7c7048ea6f (diff) | |
| download | system_core-227c74af84f6612559bfb3dceeac324c8ef30870.tar.gz system_core-227c74af84f6612559bfb3dceeac324c8ef30870.tar.bz2 system_core-227c74af84f6612559bfb3dceeac324c8ef30870.zip | |
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/blkdev.c')
| -rw-r--r-- | vold/blkdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vold/blkdev.c b/vold/blkdev.c index 1482a1ac..0a15a732 100644 --- a/vold/blkdev.c +++ b/vold/blkdev.c @@ -112,7 +112,7 @@ int blkdev_refresh(blkdev_t *blk) goto out; } - for (i = 0; i < 4; i++) { + for (i = 0; i < NDOSPART; i++) { struct dos_partition part; dos_partition_dec(block + DOSPARTOFF + i * sizeof(struct dos_partition), &part); @@ -134,7 +134,7 @@ int blkdev_refresh(blkdev_t *blk) struct dos_partition part; int part_no = blk->minor -1; - if (part_no < 4) { + if (part_no < NDOSPART) { dos_partition_dec(block + DOSPARTOFF + part_no * sizeof(struct dos_partition), &part); blk->part_type = part.dp_typ; } else { |
