Skip to content

Commit

Permalink
MdePkg: Correct the string order of ACPI Expanded Device Path
Browse files Browse the repository at this point in the history
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 <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
  • Loading branch information
dandanbi authored and lgao4 committed Oct 9, 2018
1 parent 959be18 commit 05fe752
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 05fe752

Please sign in to comment.