REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1226
According to UEFI Spec, for ACPI Expanded Device Path, when HIDSTR=empty, CIDSTR=empty, UID STR!=empty, the ACPI Expanded Device Path node can be displayed as AcpiExp(HID,CID,UIDSTR) format. And if UID is 0 and UIDSTR is empty, then use AcpiEx format. This patch is to correct the condition check to follow UEFI Spec when convert the device path node to the AcpiExp text format. Cc: Ruiyu Ni <ruiyu...@intel.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Liming Gao <liming....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan...@intel.com> --- MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c index 1c08a3ec2f..8e5efba1e8 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c @@ -453,11 +453,11 @@ DevPathToTextAcpiEx ( ((AcpiEx->CID >> 5) & 0x1f) + 'A' - 1, ((AcpiEx->CID >> 0) & 0x1f) + 'A' - 1, (AcpiEx->CID >> 16) & 0xFFFF ); - if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) { + if ((*HIDStr == '\0') && (*CIDStr == '\0') && (*UIDStr != '\0')) { // // use AcpiExp() // UefiDevicePathLibCatPrint ( Str, -- 2.18.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel