Skip to content

Commit 2641b10

Browse files
Daniel Martinezbluca
authored andcommitted
Use case insensitive comparison for the machine's architechture
boot loader specification states: architecture: refers to the architecture this entry is for. The argument should be an architecture identifier, using the architecture vocabulary defined by the EFI specification (i.e. IA32, x64, IA64, ARM, AA64, …). If specified and it does not match the local system architecture this entry should be hidden. The comparison should be done case-insensitively. Example: architecture aa64 https://uapi-group.org/specifications/specs/boot_loader_specification/#type-1-boot-loader-entry-keys (cherry picked from commit f819a51) (cherry picked from commit d65b742) (cherry picked from commit 129c30b) (cherry picked from commit a4577e3)
1 parent 48b38de commit 2641b10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/boot/efi/boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ static void config_entry_add_type1(
14911491

14921492
if (streq8(key, "architecture")) {
14931493
/* do not add an entry for an EFI image of architecture not matching with that of the image */
1494-
if (!streq8(value, EFI_MACHINE_TYPE_NAME)) {
1494+
if (!strcaseeq8(value, EFI_MACHINE_TYPE_NAME)) {
14951495
entry->type = LOADER_UNDEFINED;
14961496
break;
14971497
}

0 commit comments

Comments
 (0)