]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.c
ShellPkg/for: Fix potential null pointer deference
[mirror_edk2.git] / ShellPkg / Library / UefiShellDriver1CommandsLib / UefiShellDriver1CommandsLib.c
index 43cd995c855553e68f35a968cc24935c0d3413f2..95cd9a0ca8e48ae76ae50962cef6165e543f9e8c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for NULL named library for level 1 shell command functions.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -18,43 +18,6 @@ STATIC CONST CHAR16 mFileName[] = L"Driver1Commands";
 EFI_HANDLE gShellDriver1HiiHandle = NULL;\r
 BOOLEAN    gInReconnect = FALSE;\r
 \r
-/**\r
-  Function to translate the EFI_MEMORY_TYPE into a string.\r
-\r
-  @param[in] Memory     The memory type.\r
-\r
-  @retval               A string representation of the type allocated from BS Pool.\r
-**/\r
-CHAR16*\r
-EFIAPI\r
-ConvertMemoryType (\r
-  IN CONST EFI_MEMORY_TYPE Memory\r
-  )\r
-{\r
-  CHAR16 *RetVal;\r
-  RetVal = NULL;\r
-\r
-  switch (Memory) {\r
-  case EfiReservedMemoryType:       StrnCatGrow(&RetVal, NULL, L"EfiReservedMemoryType", 0);        break;\r
-  case EfiLoaderCode:               StrnCatGrow(&RetVal, NULL, L"EfiLoaderCode", 0);                break;\r
-  case EfiLoaderData:               StrnCatGrow(&RetVal, NULL, L"EfiLoaderData", 0);                break;\r
-  case EfiBootServicesCode:         StrnCatGrow(&RetVal, NULL, L"EfiBootServicesCode", 0);          break;\r
-  case EfiBootServicesData:         StrnCatGrow(&RetVal, NULL, L"EfiBootServicesData", 0);          break;\r
-  case EfiRuntimeServicesCode:      StrnCatGrow(&RetVal, NULL, L"EfiRuntimeServicesCode", 0);       break;\r
-  case EfiRuntimeServicesData:      StrnCatGrow(&RetVal, NULL, L"EfiRuntimeServicesData", 0);       break;\r
-  case EfiConventionalMemory:       StrnCatGrow(&RetVal, NULL, L"EfiConventionalMemory", 0);        break;\r
-  case EfiUnusableMemory:           StrnCatGrow(&RetVal, NULL, L"EfiUnusableMemory", 0);            break;\r
-  case EfiACPIReclaimMemory:        StrnCatGrow(&RetVal, NULL, L"EfiACPIReclaimMemory", 0);         break;\r
-  case EfiACPIMemoryNVS:            StrnCatGrow(&RetVal, NULL, L"EfiACPIMemoryNVS", 0);             break;\r
-  case EfiMemoryMappedIO:           StrnCatGrow(&RetVal, NULL, L"EfiMemoryMappedIO", 0);            break;\r
-  case EfiMemoryMappedIOPortSpace:  StrnCatGrow(&RetVal, NULL, L"EfiMemoryMappedIOPortSpace", 0);   break;\r
-  case EfiPalCode:                  StrnCatGrow(&RetVal, NULL, L"EfiPalCode", 0);                   break;\r
-  case EfiMaxMemoryType:            StrnCatGrow(&RetVal, NULL, L"EfiMaxMemoryType", 0);             break;\r
-  default: ASSERT(FALSE);\r
-  }\r
-  return (RetVal);\r
-}\r
-\r
 /**\r
   Function to return the name of the file containing help if HII will not be used.\r
 \r