arrfab / rpms / shim

Forked from rpms/shim 4 years ago
Clone

Blame SOURCES/0031-Remove-grubpath-in-generate_path.patch

e97c83
From 78aaad3003d53a14a009176ad5816937e18fa33f Mon Sep 17 00:00:00 2001
e97c83
From: Gary Ching-Pang Lin <glin@suse.com>
e97c83
Date: Mon, 26 May 2014 16:49:10 +0800
e97c83
Subject: [PATCH 31/74] Remove grubpath in generate_path()
e97c83
e97c83
The variable is not used anymore.
e97c83
e97c83
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
e97c83
---
e97c83
 shim.c | 9 ++-------
e97c83
 1 file changed, 2 insertions(+), 7 deletions(-)
e97c83
e97c83
diff --git a/shim.c b/shim.c
e97c83
index cd26ce6..eb8542a 100644
e97c83
--- a/shim.c
e97c83
+++ b/shim.c
e97c83
@@ -1134,17 +1134,15 @@ should_use_fallback(EFI_HANDLE image_handle)
e97c83
  * of the executable
e97c83
  */
e97c83
 static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
e97c83
-				EFI_DEVICE_PATH **grubpath, CHAR16 **PathName)
e97c83
+				CHAR16 **PathName)
e97c83
 {
e97c83
 	EFI_DEVICE_PATH *devpath;
e97c83
-	EFI_HANDLE device;
e97c83
 	unsigned int i;
e97c83
 	int j, last = -1;
e97c83
 	unsigned int pathlen = 0;
e97c83
 	EFI_STATUS efi_status = EFI_SUCCESS;
e97c83
 	CHAR16 *bootpath;
e97c83
 
e97c83
-	device = li->DeviceHandle;
e97c83
 	devpath = li->FilePath;
e97c83
 
e97c83
 	bootpath = DevicePathToStr(devpath);
e97c83
@@ -1197,8 +1195,6 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
e97c83
 		StrCat(*PathName, bootpath);
e97c83
 	StrCat(*PathName, ImagePath);
e97c83
 
e97c83
-	*grubpath = FileDevicePath(device, *PathName);
e97c83
-
e97c83
 error:
e97c83
 	FreePool(bootpath);
e97c83
 
e97c83
@@ -1361,7 +1357,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
e97c83
 	EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
e97c83
 	EFI_STATUS efi_status;
e97c83
 	EFI_LOADED_IMAGE *li, li_bak;
e97c83
-	EFI_DEVICE_PATH *path;
e97c83
 	CHAR16 *PathName = NULL;
e97c83
 	void *sourcebuffer = NULL;
e97c83
 	UINT64 sourcesize = 0;
e97c83
@@ -1383,7 +1378,7 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
e97c83
 	/*
e97c83
 	 * Build a new path from the existing one plus the executable name
e97c83
 	 */
e97c83
-	efi_status = generate_path(li, ImagePath, &path, &PathName);
e97c83
+	efi_status = generate_path(li, ImagePath, &PathName);
e97c83
 
e97c83
 	if (efi_status != EFI_SUCCESS) {
e97c83
 		Print(L"Unable to generate path %s: %r\n", ImagePath, efi_status);
e97c83
-- 
e97c83
1.9.3
e97c83