Browse Source

From: David Decotigny <decot@googlers.com>
Date: Thu, 31 Jul 2014 13:39:37 -0700
Subject: [PATCH 2/4] Use OpenProtocol instead of HandleProtocol

UEFI 2.x recommends OpenProtocol instead of HandleProtocol.

Signed-off-by: David Decotigny <decot@googlers.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>

Nigel Croxon 10 years ago
parent
commit
2f440200c8
1 changed files with 8 additions and 2 deletions
  1. 8 2
      gnu-efi-3.0/lib/cmdline.c

+ 8 - 2
gnu-efi-3.0/lib/cmdline.c

@@ -19,8 +19,14 @@ GetShellArgcArgv(
   static CHAR16 *Argv[MAX_CMDLINE_ARGC], *ArgStart, *c;
   static CHAR16 *Argv[MAX_CMDLINE_ARGC], *ArgStart, *c;
   UINTN Argc = 0, BufLen;
   UINTN Argc = 0, BufLen;
 
 
-  Status = uefi_call_wrapper(BS->HandleProtocol, 3,
-                             ImageHandle, &LoadedImageProtocol, &LoadedImage);
+  Status = uefi_call_wrapper(BS->OpenProtocol, 6,
+                             ImageHandle,
+                             &LoadedImageProtocol,
+                             &LoadedImage,
+                             ImageHandle,
+                             NULL,
+                             EFI_OPEN_PROTOCOL_GET_PROTOCOL
+                             );
   if (EFI_ERROR(Status))
   if (EFI_ERROR(Status))
     return -1;
     return -1;