mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-07-24 00:53:28 +00:00
Remove grubpath in generate_path()
The variable is not used anymore. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
This commit is contained in:
parent
5f18e2e364
commit
78aaad3003
9
shim.c
9
shim.c
@ -1134,17 +1134,15 @@ should_use_fallback(EFI_HANDLE image_handle)
|
|||||||
* of the executable
|
* of the executable
|
||||||
*/
|
*/
|
||||||
static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
|
static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
|
||||||
EFI_DEVICE_PATH **grubpath, CHAR16 **PathName)
|
CHAR16 **PathName)
|
||||||
{
|
{
|
||||||
EFI_DEVICE_PATH *devpath;
|
EFI_DEVICE_PATH *devpath;
|
||||||
EFI_HANDLE device;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int j, last = -1;
|
int j, last = -1;
|
||||||
unsigned int pathlen = 0;
|
unsigned int pathlen = 0;
|
||||||
EFI_STATUS efi_status = EFI_SUCCESS;
|
EFI_STATUS efi_status = EFI_SUCCESS;
|
||||||
CHAR16 *bootpath;
|
CHAR16 *bootpath;
|
||||||
|
|
||||||
device = li->DeviceHandle;
|
|
||||||
devpath = li->FilePath;
|
devpath = li->FilePath;
|
||||||
|
|
||||||
bootpath = DevicePathToStr(devpath);
|
bootpath = DevicePathToStr(devpath);
|
||||||
@ -1197,8 +1195,6 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
|
|||||||
StrCat(*PathName, bootpath);
|
StrCat(*PathName, bootpath);
|
||||||
StrCat(*PathName, ImagePath);
|
StrCat(*PathName, ImagePath);
|
||||||
|
|
||||||
*grubpath = FileDevicePath(device, *PathName);
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
FreePool(bootpath);
|
FreePool(bootpath);
|
||||||
|
|
||||||
@ -1361,7 +1357,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
|
|||||||
EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
|
EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
|
||||||
EFI_STATUS efi_status;
|
EFI_STATUS efi_status;
|
||||||
EFI_LOADED_IMAGE *li, li_bak;
|
EFI_LOADED_IMAGE *li, li_bak;
|
||||||
EFI_DEVICE_PATH *path;
|
|
||||||
CHAR16 *PathName = NULL;
|
CHAR16 *PathName = NULL;
|
||||||
void *sourcebuffer = NULL;
|
void *sourcebuffer = NULL;
|
||||||
UINT64 sourcesize = 0;
|
UINT64 sourcesize = 0;
|
||||||
@ -1383,7 +1378,7 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
|
|||||||
/*
|
/*
|
||||||
* Build a new path from the existing one plus the executable name
|
* Build a new path from the existing one plus the executable name
|
||||||
*/
|
*/
|
||||||
efi_status = generate_path(li, ImagePath, &path, &PathName);
|
efi_status = generate_path(li, ImagePath, &PathName);
|
||||||
|
|
||||||
if (efi_status != EFI_SUCCESS) {
|
if (efi_status != EFI_SUCCESS) {
|
||||||
Print(L"Unable to generate path %s: %r\n", ImagePath, efi_status);
|
Print(L"Unable to generate path %s: %r\n", ImagePath, efi_status);
|
||||||
|
Loading…
Reference in New Issue
Block a user