Commit 6ef00625 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] partitioning cleanup: use DOS_EXTENDED_PARTITION

From: FabF <Fabian.Frederick@skynet.be>

Use the pre-existing enum rather than magic numbers.
parent 073c4132
...@@ -407,8 +407,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) ...@@ -407,8 +407,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
* On the second pass look inside *BSD, Unixware and Solaris partitions. * On the second pass look inside *BSD, Unixware and Solaris partitions.
*/ */
state->next = 5; state->next = DOS_EXTENDED_PARTITION;
for (slot = 1 ; slot <= 4 ; slot++, p++) { for (slot = 1 ; slot < DOS_EXTENDED_PARTITION ; slot++, p++) {
u32 start = START_SECT(p)*sector_size; u32 start = START_SECT(p)*sector_size;
u32 size = NR_SECTS(p)*sector_size; u32 size = NR_SECTS(p)*sector_size;
if (!size) if (!size)
...@@ -435,7 +435,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) ...@@ -435,7 +435,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
/* second pass - output for each on a separate line */ /* second pass - output for each on a separate line */
p = (struct partition *) (0x1be + data); 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); unsigned char id = SYS_IND(p);
int n; int n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment