* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip

disks with unknown size.
	* grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-01-14 11:42:52 +01:00
parent 4d1e2bc9e3
commit 280d9d3e3e
4 changed files with 13 additions and 15 deletions

View file

@ -618,7 +618,6 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
}
grub_printf ("\n");
initrd_size = grub_file_size (file);
initrd_pages = (page_align (initrd_size) >> 12);
initrd_mem = grub_efi_allocate_pages (0, initrd_pages);
if (! initrd_mem)

View file

@ -478,10 +478,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
GRUB_RELOCATOR_PREFERENCE_NONE);
if (err)
{
grub_file_close (file);
return err;
}
goto fail;
initrd_src = get_virtual_current_address (ch);
initrd_dest = get_physical_target_address (ch) | 0x80000000;
}
@ -507,10 +504,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
" rd_size=0x%" PRIxGRUB_ADDR, params,
initrd_dest, size);
if (!tmp)
{
grub_file_close (file);
return grub_errno;
}
goto fail;
grub_free (params);
params = tmp;
}
@ -532,9 +526,12 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
initrd_loaded = 1;
grub_file_close (file);
fail:
for (i = 0; i < nfiles; i++)
grub_file_close (files[i]);
grub_free (files);
return GRUB_ERR_NONE;
return grub_errno;
}
static grub_command_t cmd_linux, cmd_initrd;

View file

@ -380,8 +380,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
initrd_size = size;
fail:
if (file)
grub_file_close (file);
for (i = 0; i < nfiles; i++)
grub_file_close (files[i]);
grub_free (files);
return grub_errno;
}

View file

@ -445,8 +445,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
initrd_size = size;
fail:
if (file)
grub_file_close (file);
for (i = 0; i < nfiles; i++)
grub_file_close (files[i]);
grub_free (files);
return grub_errno;
}