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
)\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
FreePool(mProfileList);\r
}\r
\r
- gEfiShellProtocol = NULL;\r
- gEfiShellParametersProtocol = NULL;\r
gUnicodeCollation = NULL;\r
gDevPathToText = NULL;\r
gShellCurDir = NULL;\r