]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
Clarify that the shared variables of the shell protocols are properly named.
[mirror_edk2.git] / ShellPkg / Library / UefiShellCommandLib / UefiShellCommandLib.c
index b91ba27af04d9375356bb7c6f9a392ea49490113..82a9e78ed58024bf00bfe4e03ab003af5ad24b09 100644 (file)
@@ -34,8 +34,6 @@ STATIC UINTN                              mBlkMaxCount = 0;
 STATIC BUFFER_LIST                        mFileHandleList;\r
 \r
 // global variables required by library class.\r
-EFI_SHELL_PROTOCOL                *gEfiShellProtocol            = NULL;\r
-EFI_SHELL_PARAMETERS_PROTOCOL     *gEfiShellParametersProtocol  = NULL;\r
 EFI_UNICODE_COLLATION_PROTOCOL    *gUnicodeCollation            = NULL;\r
 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *gDevPathToText               = NULL;\r
 SHELL_MAP_LIST                    gShellMapList;\r
@@ -59,24 +57,6 @@ CommandInit(
   )\r
 {\r
   EFI_STATUS Status;\r
-  if (gEfiShellParametersProtocol == NULL) {\r
-    Status = gBS->OpenProtocol(gImageHandle,\r
-                               &gEfiShellParametersProtocolGuid,\r
-                               (VOID **)&gEfiShellParametersProtocol,\r
-                               gImageHandle,\r
-                               NULL,\r
-                               EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                              );\r
-    if (EFI_ERROR(Status)) {\r
-      return (EFI_DEVICE_ERROR);\r
-    }\r
-  }\r
-  if (gEfiShellProtocol == NULL) {\r
-    Status = gBS->LocateProtocol(&gEfiShellProtocolGuid, NULL, (VOID**)&gEfiShellProtocol);\r
-    if (EFI_ERROR(Status)) {\r
-      return (EFI_DEVICE_ERROR);\r
-    }\r
-  }\r
   if (gUnicodeCollation == NULL) {\r
     Status = gBS->LocateProtocol(&gEfiUnicodeCollation2ProtocolGuid, NULL, (VOID**)&gUnicodeCollation);\r
     if (EFI_ERROR(Status)) {\r
@@ -207,8 +187,6 @@ ShellCommandLibDestructor (
     FreePool(mProfileList);\r
   }\r
 \r
-  gEfiShellProtocol            = NULL;\r
-  gEfiShellParametersProtocol  = NULL;\r
   gUnicodeCollation            = NULL;\r
   gDevPathToText               = NULL;\r
   gShellCurDir                 = NULL;\r