2012-06-29 06:59:42 +02:00
|
|
|
References: bnc#750897
|
|
|
|
|
|
|
|
---
|
2012-03-22 12:32:34 +01:00
|
|
|
Index: grub-1.99/grub-core/partmap/msdos.c
|
|
|
|
===================================================================
|
|
|
|
--- grub-1.99.orig/grub-core/partmap/msdos.c
|
|
|
|
+++ grub-1.99/grub-core/partmap/msdos.c
|
|
|
|
@@ -107,11 +107,15 @@ grub_partition_msdos_iterate (grub_disk_
|
2012-06-29 06:59:42 +02:00
|
|
|
(unsigned long long) p.len);
|
2012-03-22 12:32:34 +01:00
|
|
|
|
|
|
|
/* If this partition is a normal one, call the hook. */
|
|
|
|
- if (! grub_msdos_partition_is_empty (e->type)
|
|
|
|
- && ! grub_msdos_partition_is_extended (e->type))
|
|
|
|
+ if (! grub_msdos_partition_is_empty (e->type))
|
|
|
|
{
|
|
|
|
p.number++;
|
|
|
|
|
|
|
|
+ /* prevent someone doing mkfs or mkswap on an
|
|
|
|
+ extended partition, but leave room for LILO */
|
|
|
|
+ if (grub_msdos_partition_is_extended (e->type))
|
|
|
|
+ p.len = 2;
|
|
|
|
+
|
|
|
|
if (hook (disk, &p))
|
|
|
|
return grub_errno;
|
|
|
|
}
|