From a14c18ba7b4e85f34bd48c5a778ea5eafe5c8688 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 26 Jan 2020 12:59:48 +0900 Subject: [PATCH 1/2] sd-boot: fix typo Fixes #14657. --- src/boot/efi/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index e1a1a685279..18304138e7f 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -404,10 +404,10 @@ static VOID print_status(Config *config, CHAR16 *loaded_image_path) { Print(L"random-seed-mode: off\n"); break; case RANDOM_SEED_WITH_SYSTEM_TOKEN: - Print(L"random-seed-node: with-system-token\n"); + Print(L"random-seed-mode: with-system-token\n"); break; case RANDOM_SEED_ALWAYS: - Print(L"random-seed-node: always\n"); + Print(L"random-seed-mode: always\n"); break; default: ; From fe5a698f7646735335a97cc429ebe5d79f67fb70 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 26 Jan 2020 13:05:13 +0900 Subject: [PATCH 2/2] bootspec: parse random-seed-mode line in loader.conf Fixes #14657. --- src/shared/bootspec.c | 3 +++ src/shared/bootspec.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 699b101b390..13d7b2f1607 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -164,6 +164,7 @@ void boot_config_free(BootConfig *config) { free(config->auto_entries); free(config->auto_firmware); free(config->console_mode); + free(config->random_seed_mode); free(config->entry_oneshot); free(config->entry_default); @@ -229,6 +230,8 @@ static int boot_loader_read_conf(const char *path, BootConfig *config) { r = free_and_strdup(&config->auto_firmware, p); else if (streq(field, "console-mode")) r = free_and_strdup(&config->console_mode, p); + else if (streq(field, "random-seed-mode")) + r = free_and_strdup(&config->random_seed_mode, p); else { log_notice("%s:%u: Unknown line \"%s\", ignoring.", path, line, field); continue; diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index a825b35bc58..b40680b643b 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -43,6 +43,7 @@ typedef struct BootConfig { char *auto_entries; char *auto_firmware; char *console_mode; + char *random_seed_mode; char *entry_oneshot; char *entry_default;