SHA256
1
0
forked from pool/grub2
grub2/grub2-iterate-and-hook-for-extended-partition.patch
Stephan Kulow 88507aed88 Accepting request 110168 from devel:openSUSE:Factory
- Fix build with gcc 4.7 (needs -fno-strict-aliasing for zfs code).
- Fix error in installation to extended partition (bnc#750897)
- Added BuildRequires for gnu-unifont

OBS-URL: https://build.opensuse.org/request/show/110168
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=30
2012-03-22 11:32:34 +00:00

23 lines
819 B
Diff

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_
return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr");
/* 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;
}