]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/GenericBdsLib/DevicePath.c
Add INF extension Information
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / DevicePath.c
index 421bba00cb37119e2961d6e50b2aab1fa1693f5b..135fa63d1a018995d57a80f652243aad6115ded7 100644 (file)
@@ -19,15 +19,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Concatenates a formatted unicode string to allocated pool.\r
   The caller must free the resulting buffer.\r
 \r
-  @param  Str      Tracks the allocated pool, size in use, and  amount of pool\r
-                   allocated.\r
+  @param  Str      Tracks the allocated pool, size in use, and amount of pool allocated.\r
   @param  fmt      The format string\r
-\r
-  @param  ...      Variable argument list.\r
+  @param  ...      The data will be printed.\r
 \r
   @return Allocated buffer with the formatted string printed in it.\r
-          The caller must free the allocated buffer.   The buffer\r
-          allocation is not packed.\r
+          The caller must free the allocated buffer.\r
+          The buffer allocation is not packed.\r
 \r
 **/\r
 CHAR16 *\r
@@ -172,13 +170,10 @@ DevPathController (
 \r
 \r
 /**\r
-  Convert Device Path to a Unicode string for printing.\r
+  Convert Vendor device path to device name.\r
 \r
-  @param Str             The buffer holding the output string.\r
-                         This buffer contains the length of the\r
-                         string and the maixmum length reserved\r
-                         for the string buffer.\r
-  @param DevPath         The device path.\r
+  @param  Str      The buffer store device name\r
+  @param  DevPath  Pointer to vendor device path\r
 \r
 **/\r
 VOID\r
@@ -1480,10 +1475,6 @@ DevicePathToStr (
     //\r
     DevPathNode = NextDevicePathNode (DevPathNode);\r
   }\r
-  //\r
-  // Shrink pool used for string allocation\r
-  //\r
-  FreePool (DevPath);\r
 \r
 Done:\r
   NewSize = (Str.len + 1) * sizeof (CHAR16);\r
@@ -1492,45 +1483,3 @@ Done:
   Str.str[Str.len] = 0;\r
   return Str.str;\r
 }\r
-\r
-/**\r
-  Function creates a device path data structure that identically matches the\r
-  device path passed in.\r
-\r
-  @param  DevPath  A pointer to a device path data structure.\r
-\r
-  @return The new copy of DevPath is created to identically match the input.\r
-  @return Otherwise, NULL is returned.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-LibDuplicateDevicePathInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevPath\r
-  )\r
-{\r
-  EFI_DEVICE_PATH_PROTOCOL  *NewDevPath;\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePathInst;\r
-  EFI_DEVICE_PATH_PROTOCOL  *Temp;\r
-  UINTN                     Size;\r
-\r
-  //\r
-  // get the size of an instance from the input\r
-  //\r
-  Temp            = DevPath;\r
-  DevicePathInst  = GetNextDevicePathInstance (&Temp, &Size);\r
-\r
-  //\r
-  // Make a copy\r
-  //\r
-  NewDevPath = NULL;\r
-  if (Size != 0) {\r
-    NewDevPath = AllocateZeroPool (Size);\r
-    ASSERT (NewDevPath != NULL);\r
-  }\r
-\r
-  if (NewDevPath != NULL) {\r
-    CopyMem (NewDevPath, DevicePathInst, Size);\r
-  }\r
-\r
-  return NewDevPath;\r
-}\r