Automatically determine prefix when netbooted on EFI
This commit is contained in:
parent
574618a2e9
commit
cae730b452
8 changed files with 237 additions and 123 deletions
|
@ -42,6 +42,10 @@ grub_efi_init (void)
|
|||
grub_efidisk_init ();
|
||||
}
|
||||
|
||||
void (*grub_efi_net_config) (grub_efi_handle_t hnd,
|
||||
char **device,
|
||||
char **path);
|
||||
|
||||
void
|
||||
grub_machine_get_bootlocation (char **device, char **path)
|
||||
{
|
||||
|
@ -53,6 +57,8 @@ grub_machine_get_bootlocation (char **device, char **path)
|
|||
return;
|
||||
*device = grub_efidisk_get_device_name (image->device_handle);
|
||||
*path = grub_efi_get_filename (image->file_path);
|
||||
if (!*device && grub_efi_net_config)
|
||||
grub_efi_net_config (image->device_handle, device, path);
|
||||
|
||||
/* Get the directory. */
|
||||
p = grub_strrchr (*path, '/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue