2010-01-20 Dan Merillat <debian@dan.merillat.org>
* kern/device.c (grub_device_iterate): Allocate new part_ent structure based on sizeof (*p) rather than sizeof (p->next), to account for structure padding. * util/grub-probe.c (probe_raid_level): Return -1 immediately if disk is NULL, which might happen for LVM physical volumes with no LVM signature.
This commit is contained in:
parent
d4a4ee5765
commit
917dd37040
3 changed files with 16 additions and 1 deletions
|
@ -94,6 +94,11 @@ probe_partmap (grub_disk_t disk)
|
|||
static int
|
||||
probe_raid_level (grub_disk_t disk)
|
||||
{
|
||||
/* disk might be NULL in the case of a LVM physical volume with no LVM
|
||||
signature. Ignore such cases here. */
|
||||
if (!disk)
|
||||
return -1;
|
||||
|
||||
if (disk->dev->id != GRUB_DISK_DEVICE_RAID_ID)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue