X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiDevicePathLib%2FDevicePathToText.c;h=5922deeea840b2a75eb24565e61890e043e9a93c;hp=627308c340be2867bdd373e3ab343cf3cc693a8d;hb=c3c9892c3b4dafd1d0ccdc8e5e017d80e8c4361e;hpb=6252f2715af3f7d9d56980b1e0176ad069770e5f diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c index 627308c340..5922deeea8 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c @@ -42,6 +42,7 @@ UefiDevicePathLibCatPrint ( VA_START (Args, Fmt); Count = SPrintLength (Fmt, Args); + VA_END(Args); if ((Str->Count + (Count + 1)) * sizeof (CHAR16) > Str->Capacity) { Str->Capacity = (Str->Count + (Count + 1) * 2) * sizeof (CHAR16); @@ -52,6 +53,7 @@ UefiDevicePathLibCatPrint ( ); ASSERT (Str->Str != NULL); } + VA_START (Args, Fmt); UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args); Str->Count += Count; @@ -333,7 +335,7 @@ DevPathToTextBmc ( Bmc = DevPath; UefiDevicePathLibCatPrint ( Str, - L"Bmc(0x%x,0x%lx)", + L"BMC(0x%x,0x%lx)", Bmc->InterfaceType, ReadUnaligned64 ((UINT64 *) (&Bmc->BaseAddress)) ); @@ -822,6 +824,37 @@ DevPathToTextSd ( ); } +/** + Converts a EMMC (Embedded MMC) device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +VOID +DevPathToTextEmmc ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + EMMC_DEVICE_PATH *Emmc; + + Emmc = DevPath; + UefiDevicePathLibCatPrint ( + Str, + L"Emmc(0x%x)", + Emmc->SlotNumber + ); +} + /** Converts a 1394 device path structure to its string representative. @@ -1616,9 +1649,14 @@ DevPathToTextWiFi ( ) { WIFI_DEVICE_PATH *WiFi; + UINT8 SSId[33]; WiFi = DevPath; - UefiDevicePathLibCatPrint (Str, L"WiFi(%a)", WiFi->SSId); + + SSId[32] = '\0'; + CopyMem (SSId, WiFi->SSId, 32); + + UefiDevicePathLibCatPrint (Str, L"Wi-Fi(%a)", SSId); } /** @@ -2134,6 +2172,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLib {MESSAGING_DEVICE_PATH, MSG_NVME_NAMESPACE_DP, DevPathToTextNVMe }, {MESSAGING_DEVICE_PATH, MSG_UFS_DP, DevPathToTextUfs }, {MESSAGING_DEVICE_PATH, MSG_SD_DP, DevPathToTextSd }, + {MESSAGING_DEVICE_PATH, MSG_EMMC_DP, DevPathToTextEmmc }, {MESSAGING_DEVICE_PATH, MSG_1394_DP, DevPathToText1394 }, {MESSAGING_DEVICE_PATH, MSG_USB_DP, DevPathToTextUsb }, {MESSAGING_DEVICE_PATH, MSG_USB_WWID_DP, DevPathToTextUsbWWID },