From 05fe7525896cee197cfed98154955dbaa60d6357 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Fri, 5 Oct 2018 13:21:57 +0800 Subject: [PATCH] MdePkg: Correct the string order of ACPI Expanded Device Path REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1227 According to UEFI Spec, ACPI Expanded Device Path can be display AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDSTR)), but current code display UID|UIDSTR before CID|CIDSTR. This patch is to fix this issue. Cc: Ruiyu Ni Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Ruiyu Ni --- MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c index 85f5e97131..1c08a3ec2f 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c @@ -477,16 +477,16 @@ DevPathToTextAcpiEx ( UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText); } - if (AcpiEx->UID == 0) { - UefiDevicePathLibCatPrint (Str, L"%a,", UIDStr); + if (AcpiEx->CID == 0) { + UefiDevicePathLibCatPrint (Str, L"%a,", CIDStr); } else { - UefiDevicePathLibCatPrint (Str, L"0x%x,", AcpiEx->UID); + UefiDevicePathLibCatPrint (Str, L"%s,", CIDText); } - if (AcpiEx->CID == 0) { - UefiDevicePathLibCatPrint (Str, L"%a)", CIDStr); + if (AcpiEx->UID == 0) { + UefiDevicePathLibCatPrint (Str, L"%a)", UIDStr); } else { - UefiDevicePathLibCatPrint (Str, L"%s)", CIDText); + UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID); } } else { UefiDevicePathLibCatPrint (