aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/partitions/msdos.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c
index b78385840a55..90be97f1f5a8 100644
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -492,9 +492,16 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
492 if (!size) 492 if (!size)
493 continue; 493 continue;
494 if (is_extended_partition(p)) { 494 if (is_extended_partition(p)) {
495 /* prevent someone doing mkfs or mkswap on an 495 /*
496 extended partition, but leave room for LILO */ 496 * prevent someone doing mkfs or mkswap on an
497 put_partition(state, slot, start, size == 1 ? 1 : 2); 497 * extended partition, but leave room for LILO
498 * FIXME: this uses one logical sector for > 512b
499 * sector, although it may not be enough/proper.
500 */
501 sector_t n = 2;
502 n = min(size, max(sector_size, n));
503 put_partition(state, slot, start, n);
504
498 printk(" <"); 505 printk(" <");
499 parse_extended(state, bdev, start, size); 506 parse_extended(state, bdev, start, size);
500 printk(" >"); 507 printk(" >");