libefivar: Correct the string order of ACPI Expanded Device Path

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.

Upstream Bug:	https://bugzilla.tianocore.org/show_bug.cgi?id=1227
Obtained from:	05fe752589
Pull Request:   https://github.com/freebsd/freebsd-src/pull/581
This commit is contained in:
Jose Luis Duran 2022-02-23 13:45:14 -03:00 committed by Warner Losh
parent 49951297d2
commit 8278071ae1

View File

@ -536,16 +536,16 @@ DevPathToTextAcpiEx (
UefiDevicePathLibCatPrint (Str, "AcpiEx(%s,", HIDText);
}
if (AcpiEx->UID == 0) {
UefiDevicePathLibCatPrint (Str, "%s,", UIDStr);
if (AcpiEx->CID == 0) {
UefiDevicePathLibCatPrint (Str, "%s,", CIDStr);
} else {
UefiDevicePathLibCatPrint (Str, "0x%x,", AcpiEx->UID);
UefiDevicePathLibCatPrint (Str, "%s,", CIDText);
}
if (AcpiEx->CID == 0) {
UefiDevicePathLibCatPrint (Str, "%s)", CIDStr);
if (AcpiEx->UID == 0) {
UefiDevicePathLibCatPrint (Str, "%s)", UIDStr);
} else {
UefiDevicePathLibCatPrint (Str, "%s)", CIDText);
UefiDevicePathLibCatPrint (Str, "0x%x)", AcpiEx->UID);
}
} else {
UefiDevicePathLibCatPrint (