summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-11 23:11:48 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-12 20:54:22 +0200
commit05fefe768177dee6d5ffa6e95867806adc030c21 (patch)
treeef10a6e9e95720ef436d98d596351822be9d8999 /lib
parent3b985113be63821c799ae6ee98690f740f49a0e9 (diff)
efi_loader: ACPI device node to text
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_device_path_to_text.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index e219f84b28..f3a9579076 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -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;
}