summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-10-05 14:35:25 +0800
committerLiming Gao <liming.gao@intel.com>2018-10-09 22:20:19 +0800
commitfb4bea551e5b7e16e54676bca3d1ccde65f57c77 (patch)
tree2634a365fab2a2a7f4a3420bba07fbbf61af5300
parent05fe7525896cee197cfed98154955dbaa60d6357 (diff)
downloadedk2-fb4bea551e5b7e16e54676bca3d1ccde65f57c77.tar.gz
edk2-fb4bea551e5b7e16e54676bca3d1ccde65f57c77.tar.bz2
edk2-fb4bea551e5b7e16e54676bca3d1ccde65f57c77.zip
MdePkg: Correct condition check for AcpiExp text format
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.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>
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathToText.c2
1 files changed, 1 insertions, 1 deletions
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
@@ -455,7 +455,7 @@ DevPathToTextAcpiEx (
(AcpiEx->CID >> 16) & 0xFFFF
);
- if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) {
+ if ((*HIDStr == '\0') && (*CIDStr == '\0') && (*UIDStr != '\0')) {
//
// use AcpiExp()
//