From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E4742116324F for ; Sun, 7 Oct 2018 20:32:26 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2018 20:32:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,355,1534834800"; d="scan'208";a="96965147" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga001.fm.intel.com with ESMTP; 07 Oct 2018 20:32:12 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Michael D Kinney , Liming Gao Date: Mon, 8 Oct 2018 11:31:55 +0800 Message-Id: <20181008033158.10652-2-dandan.bi@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20181008033158.10652-1-dandan.bi@intel.com> References: <20181008033158.10652-1-dandan.bi@intel.com> Subject: [patch 2/5] MdePkg: Correct the string order of ACPI Expanded Device Path X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2018 03:32:26 -0000 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 --- 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 @@ -475,20 +475,20 @@ DevPathToTextAcpiEx ( UefiDevicePathLibCatPrint (Str, L"AcpiEx(%a,", HIDStr); } else { 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 ( Str, L"AcpiEx(%s,%s,0x%x,%a,%a,%a)", -- 2.18.0.windows.1