Fix compilation problem

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-27 22:40:49 +01:00
parent df32be8cc1
commit 3a7c36977a

View file

@ -678,7 +678,6 @@ grub_multiboot_add_module (grub_addr_t start, grub_size_t size,
void
grub_multiboot_set_bootdev (void)
{
char *p;
grub_device_t dev;
slice = ~0;
@ -696,22 +695,13 @@ grub_multiboot_set_bootdev (void)
dev = grub_device_open (0);
if (dev && dev->disk && dev->disk->partition)
{
char *p0;
p = p0 = dev->disk->partition->partmap->get_name (dev->disk->partition);
if (p)
if (dev->disk->partition->parent)
{
if ((p[0] >= '0') && (p[0] <= '9'))
{
slice = grub_strtoul (p, &p, 0) - 1;
if ((p) && (p[0] == ','))
p++;
part = dev->disk->partition->number;
slice = dev->disk->partition->parent->number;
}
if ((p[0] >= 'a') && (p[0] <= 'z'))
part = p[0] - 'a';
}
grub_free (p0);
else
slice = dev->disk->partition->number;
}
if (dev)
grub_device_close (dev);