]> git.baikalelectronics.ru Git - uboot.git/commitdiff
efi_loader: ACPI device node to text
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 11 May 2019 21:11:48 +0000 (23:11 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 12 May 2019 18:54:22 +0000 (20:54 +0200)
The device path to text protocol renders ACPI device nodes incorrectly.

Use capital hexadecimal numbers as shown in the UEFI spec examples.

Always output the optional UID. This matches what UEFI SCT expects and
saves us an `if`.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_device_path_to_text.c

index e219f84b28d229924d975a3418e0e904df8b06e8..f3a95790766472323da24337d6c722d87c0089a9 100644 (file)
@@ -78,9 +78,9 @@ static char *dp_acpi(char *s, struct efi_device_path *dp)
        case DEVICE_PATH_SUB_TYPE_ACPI_DEVICE: {
                struct efi_device_path_acpi_path *adp =
                        (struct efi_device_path_acpi_path *)dp;
-               s += sprintf(s, "Acpi(PNP%04x", EISA_PNP_NUM(adp->hid));
-               if (adp->uid)
-                       s += sprintf(s, ",%d", adp->uid);
+
+               s += sprintf(s, "Acpi(PNP%04X", EISA_PNP_NUM(adp->hid));
+               s += sprintf(s, ",%d", adp->uid);
                s += sprintf(s, ")");
                break;
        }