X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fpartitions%2Fmsdos.c;h=e98505bf803d708398108fe5b66f9b1eed64a9a5;hb=5e3b93f248c98873cc843e83092bb8da92ac85a2;hp=100fa7548a42a7f316f5550e3f962a5cdf1e3565;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index 100fa7548..e98505bf8 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c @@ -422,8 +422,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) * On the second pass look inside *BSD, Unixware and Solaris partitions. */ - state->next = 5; - for (slot = 1 ; slot <= 4 ; slot++, p++) { + state->next = DOS_EXTENDED_PARTITION; + for (slot = 1 ; slot < DOS_EXTENDED_PARTITION ; slot++, p++) { u32 start = START_SECT(p)*sector_size; u32 size = NR_SECTS(p)*sector_size; if (!size) @@ -450,7 +450,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) /* second pass - output for each on a separate line */ p = (struct partition *) (0x1be + data); - for (slot = 1 ; slot <= 4 ; slot++, p++) { + for (slot = 1 ; slot < DOS_EXTENDED_PARTITION ; slot++, p++) { unsigned char id = SYS_IND(p); int n;