1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

bootspec: parse random-seed-mode line in loader.conf

Fixes #14657.
This commit is contained in:
Yu Watanabe 2020-01-26 13:05:13 +09:00
parent a14c18ba7b
commit fe5a698f76
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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;