]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
MdePkg/UefiLib: Add EfiLocateProtocolBuffer()
[mirror_edk2.git] / ShellPkg / Library / UefiShellCommandLib / ConsistMapping.c
old mode 100644 (file)
new mode 100755 (executable)
index d157ebb..3b13e62
@@ -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
@@ -85,6 +85,7 @@ typedef struct {
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CatPrint (\r
   IN OUT POOL_PRINT   *Str,\r
   IN CHAR16           *Fmt,\r
@@ -1332,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
@@ -1369,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
@@ -1424,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
@@ -1612,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
@@ -1669,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