]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Correct the string order of ACPI Expanded Device Path
authorDandan Bi <dandan.bi@intel.com>
Fri, 5 Oct 2018 05:21:57 +0000 (13:21 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 9 Oct 2018 14:20:18 +0000 (22:20 +0800)
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>
MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

index 85f5e97131e89c303e9e5d6f26a8937a00f36493..1c08a3ec2fca295f1aa56ffa9cd6dc6c6ff53399 100644 (file)
@@ -477,16 +477,16 @@ DevPathToTextAcpiEx (
         UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText);\r
       }\r
 \r
-      if (AcpiEx->UID == 0) {\r
-        UefiDevicePathLibCatPrint (Str, L"%a,", UIDStr);\r
+      if (AcpiEx->CID == 0) {\r
+        UefiDevicePathLibCatPrint (Str, L"%a,", CIDStr);\r
       } else {\r
-        UefiDevicePathLibCatPrint (Str, L"0x%x,", AcpiEx->UID);\r
+        UefiDevicePathLibCatPrint (Str, L"%s,", CIDText);\r
       }\r
 \r
-      if (AcpiEx->CID == 0) {\r
-        UefiDevicePathLibCatPrint (Str, L"%a)", CIDStr);\r
+      if (AcpiEx->UID == 0) {\r
+        UefiDevicePathLibCatPrint (Str, L"%a)", UIDStr);\r
       } else {\r
-        UefiDevicePathLibCatPrint (Str, L"%s)", CIDText);\r
+        UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID);\r
       }\r
     } else {\r
       UefiDevicePathLibCatPrint (\r