diff options
author | Alexander Graf | 2016-03-04 01:10:14 +0100 |
---|---|---|
committer | Tom Rini | 2016-03-15 21:30:14 -0400 |
commit | 0f4060ebcb4f60287c456586cf089510e43ba339 (patch) | |
tree | bbcf2d01e545099b686ef123325022e3f3a25236 /lib/efi_loader/efi_disk.c | |
parent | dea2174d9d941db2ec64997779771a4b4c3527c2 (diff) |
efi_loader: Pass proper device path in on boot
EFI payloads can query for the device they were booted from. Because
we have a disconnect between loading binaries and running binaries,
we passed in a dummy device path so far.
Unfortunately that breaks grub2's logic to find its configuration
file from the same device it was booted from.
This patch adds logic to have the "load" command call into our efi
code to set the device path to the one we last loaded a binary from.
With this grub2 properly detects where we got booted from and can
find its configuration file, even when searching by-partition.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_disk.c')
-rw-r--r-- | lib/efi_loader/efi_disk.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 6f543ff5cb0..aaff947596f 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -29,12 +29,6 @@ struct efi_disk_obj { struct efi_device_path_file_path *dp; }; -static void ascii2unicode(u16 *unicode, char *ascii) -{ - while (*ascii) - *(unicode++) = *(ascii++); -} - static efi_status_t efi_disk_open_block(void *handle, efi_guid_t *protocol, void **protocol_interface, void *agent_handle, void *controller_handle, uint32_t attributes) |