mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 11:27:58 +00:00
Fix compilation problem
This commit is contained in:
parent
df32be8cc1
commit
3a7c36977a
@ -678,7 +678,6 @@ grub_multiboot_add_module (grub_addr_t start, grub_size_t size,
|
|||||||
void
|
void
|
||||||
grub_multiboot_set_bootdev (void)
|
grub_multiboot_set_bootdev (void)
|
||||||
{
|
{
|
||||||
char *p;
|
|
||||||
grub_device_t dev;
|
grub_device_t dev;
|
||||||
|
|
||||||
slice = ~0;
|
slice = ~0;
|
||||||
@ -696,22 +695,13 @@ grub_multiboot_set_bootdev (void)
|
|||||||
dev = grub_device_open (0);
|
dev = grub_device_open (0);
|
||||||
if (dev && dev->disk && dev->disk->partition)
|
if (dev && dev->disk && dev->disk->partition)
|
||||||
{
|
{
|
||||||
char *p0;
|
if (dev->disk->partition->parent)
|
||||||
p = p0 = dev->disk->partition->partmap->get_name (dev->disk->partition);
|
|
||||||
if (p)
|
|
||||||
{
|
{
|
||||||
if ((p[0] >= '0') && (p[0] <= '9'))
|
part = dev->disk->partition->number;
|
||||||
{
|
slice = dev->disk->partition->parent->number;
|
||||||
slice = grub_strtoul (p, &p, 0) - 1;
|
|
||||||
|
|
||||||
if ((p) && (p[0] == ','))
|
|
||||||
p++;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if ((p[0] >= 'a') && (p[0] <= 'z'))
|
slice = dev->disk->partition->number;
|
||||||
part = p[0] - 'a';
|
|
||||||
}
|
|
||||||
grub_free (p0);
|
|
||||||
}
|
}
|
||||||
if (dev)
|
if (dev)
|
||||||
grub_device_close (dev);
|
grub_device_close (dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user