sd-boot: select newest kernel entry matching with the default glob pattern
This fixes a bug introduced by 0c674ce5f2.
Fixes #22004.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
e28df39269
commit
e37d30f334
+2
-2
@@ -1638,9 +1638,9 @@ static INTN config_entry_find(Config *config, const CHAR16 *needle) {
|
||||
if (!needle)
|
||||
return -1;
|
||||
|
||||
for (UINTN i = 0; i < config->entry_count; i++)
|
||||
for (INTN i = config->entry_count - 1; i >= 0; i--)
|
||||
if (MetaiMatch(config->entries[i]->id, (CHAR16*) needle))
|
||||
return (INTN) i;
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user