git: c1fa6f4c5d4b - main - libefivar: Fix incorrect check for DisplayOnly text format in AcpiEx

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 27 Feb 2022 16:47:54 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c1fa6f4c5d4bf40116d2d1522dd1561a7e4d8eea

commit c1fa6f4c5d4bf40116d2d1522dd1561a7e4d8eea
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2022-02-24 00:47:18 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-02-27 16:13:35 +0000

    libefivar: Fix incorrect check for DisplayOnly text format in AcpiEx
    
    Text format for AcpiEx device path in UEFI Spec:
    AcpiEx(HID,CID,UID,HIDSTR,CIDSTR,UIDSTR)
    AcpiEx(HID|HIDSTR,(CID|CIDSTR,UID|UIDSTR))(Display Only)
    
    When convert device path to text for AcpiEx device path,
    current code check AllowShortcuts parameter to convert
    the device path to DisplayOnly text format(shorter text
    representation) by mistake.
    It should check DisplayOnly parameter.
    
    This commit is to fix this issue.
    
    Upstream Bug:   https://bugzilla.tianocore.org/show_bug.cgi?id=1312
    Obtained from:  https://github.com/tianocore/edk2/commit/e9ab1635a2cfa1cb588996dcd5cc157fb44decb1
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/581
---
 lib/libefivar/efivar-dp-format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c
index 0062216ac307..9c1969d81423 100644
--- a/lib/libefivar/efivar-dp-format.c
+++ b/lib/libefivar/efivar-dp-format.c
@@ -556,7 +556,7 @@ DevPathToTextAcpiEx (
         );
     }
   } else {
-    if (AllowShortcuts) {
+    if (DisplayOnly) {
       //
       // display only
       //