]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
MdePkg: Add UFS (Universal Flash Storage) related definitions
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLib / DevicePathToText.c
index 030001905b0464173e0ebd05257dd0ff3cffaf7d..2dbbddaf097088379a6bde0e893ba8fe775ecf33 100644 (file)
@@ -731,6 +731,33 @@ DevPathToTextNVMe (
     );\r
 }\r
 \r
+/**\r
+  Converts a UFS device path structure to its string representative.\r
+\r
+  @param Str             The string representative of input device.\r
+  @param DevPath         The input device path structure.\r
+  @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
+                         of the display node is used, where applicable. If DisplayOnly\r
+                         is FALSE, then the longer text representation of the display node\r
+                         is used.\r
+  @param AllowShortcuts  If AllowShortcuts is TRUE, then the shortcut forms of text\r
+                         representation for a device node can be used, where applicable.\r
+\r
+**/\r
+VOID\r
+DevPathToTextUfs (\r
+  IN OUT POOL_PRINT  *Str,\r
+  IN VOID            *DevPath,\r
+  IN BOOLEAN         DisplayOnly,\r
+  IN BOOLEAN         AllowShortcuts\r
+  )\r
+{\r
+  UFS_DEVICE_PATH  *Ufs;\r
+\r
+  Ufs = DevPath;\r
+  UefiDevicePathLibCatPrint (Str, L"UFS(0x%x,0x%x)", Ufs->Pun, Ufs->Lun);\r
+}\r
+\r
 /**\r
   Converts a 1394 device path structure to its string representative.\r
 \r
@@ -1869,6 +1896,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLib
   {MESSAGING_DEVICE_PATH, MSG_FIBRECHANNELEX_DP,            DevPathToTextFibreEx        },\r
   {MESSAGING_DEVICE_PATH, MSG_SASEX_DP,                     DevPathToTextSasEx          },\r
   {MESSAGING_DEVICE_PATH, MSG_NVME_NAMESPACE_DP,            DevPathToTextNVMe           },\r
+  {MESSAGING_DEVICE_PATH, MSG_UFS_DP,                       DevPathToTextUfs            },\r
   {MESSAGING_DEVICE_PATH, MSG_1394_DP,                      DevPathToText1394           },\r
   {MESSAGING_DEVICE_PATH, MSG_USB_DP,                       DevPathToTextUsb            },\r
   {MESSAGING_DEVICE_PATH, MSG_USB_WWID_DP,                  DevPathToTextUsbWWID        },\r