https://bugzilla.novell.com/show_bug.cgi?id=785341
https://bugzilla.novell.com/show_bug.cgi?id=785341#c2
--- Comment #2 from Andrey Borzenkov 2012-10-17 06:41:47 UTC ---
Judging by comment, code is taken from kernel, but kernel has separate steps
for parsing primary partition table and for traversing logical partitions. So
we need here something like
if (!grub_msdos_partition_is_extended (e->type) || p.number < 3) {
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;
}
p.number < 3 because at this moment it is still previous partition number
starting with 0. Actually, the same condition should probably be used for empty
partition too, otherwise there is corner case - if the very first entry in the
very first EMBR is empty, further partition numbers will shifted. But that is
for upstream unless someone has seen it in the wild.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.