]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
ShellPkg: Rename gShellCurDir to gShellCurMapping
[mirror_edk2.git] / ShellPkg / Library / UefiShellCommandLib / ConsistMapping.c
index 979693a250f09e644bad18be27e0cc9278ae723c..3b13e62340de7c1355688967cd1899ba1fdb0c6f 100755 (executable)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for support of shell consist mapping.\r
 \r
-  Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2017, 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
@@ -1333,7 +1333,6 @@ DEV_PATH_CONSIST_MAPPING_TABLE  DevPathConsistMappingTable[] = {
   @retval FALSE   The node is not Hi.\r
 **/\r
 BOOLEAN\r
-EFIAPI\r
 IsHIDevicePathNode (\r
   IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode\r
   )\r
@@ -1370,7 +1369,6 @@ IsHIDevicePathNode (
   @return   the device path portion that is Hi.\r
 **/\r
 EFI_DEVICE_PATH_PROTOCOL *\r
-EFIAPI\r
 GetHIDevicePath (\r
   IN EFI_DEVICE_PATH_PROTOCOL        *DevicePath\r
   )\r
@@ -1425,7 +1423,6 @@ GetHIDevicePath (
   @return EFI_SUCCESS         Always returns success.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 GetDeviceConsistMappingInfo (\r
   IN DEVICE_CONSIST_MAPPING_INFO    *MappingItem,\r
   IN EFI_DEVICE_PATH_PROTOCOL       *DevicePath\r
@@ -1613,7 +1610,6 @@ ShellCommandConsistMappingGenMappingName (
   DEVICE_CONSIST_MAPPING_INFO MappingInfo;\r
   EFI_DEVICE_PATH_PROTOCOL    *HIDevicePath;\r
   UINTN                       Index;\r
-  CHAR16                      *NewStr;\r
 \r
   ASSERT(DevicePath         != NULL);\r
   ASSERT(Table  != NULL);\r
@@ -1670,13 +1666,7 @@ ShellCommandConsistMappingGenMappingName (
     return NULL;\r
   }\r
 \r
-  NewStr = ReallocatePool (Str.Len * sizeof (CHAR16), (Str.Len + 1) * sizeof (CHAR16), Str.Str);\r
-  if (NewStr == NULL) {\r
-    SHELL_FREE_NON_NULL (Str.Str);\r
-    return (NULL);\r
-  }\r
-  NewStr[Str.Len] = CHAR_NULL;\r
-  return NewStr;\r
+  return Str.Str;\r
 }\r
 \r
 /**\r