1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

boot: Load LoadOptions cmdline, if none is available.

Fixes #13694
This commit is contained in:
Dimitri John Ledkov 2019-11-12 17:08:57 -08:00 committed by Zbigniew Jędrzejewski-Szmek
parent 14e0259b49
commit 53a2045521

View File

@ -62,8 +62,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
cmdline_len = szs[0];
/* if we are not in secure boot mode, accept a custom command line and replace the built-in one */
if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions > 0x1F) {
/* if we are not in secure boot mode, or none was provided, accept a custom command line and replace the built-in one */
if ((!secure || cmdline_len == 0) && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions > 0x1F) {
CHAR16 *options;
CHAR8 *line;
UINTN i;