Automatically determine prefix when netbooted on EFI

This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2011-07-02 16:56:35 +02:00
1 parent 574618a2e9
commit cae730b452
8 files changed
+237 -123

No files matched your search

+6
View File
@@ -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, '/');