bootctl: synchronize bootctl code with sd-boot code

This patch adds a line with "#console-mode keep" as a documentation for
the console mode feature and duplicates console-mode parsing to bootctl.
This commit is contained in:
Henrique Dante de Almeida
2018-02-03 17:37:21 -02:00
parent 26e51d87f7
commit d37b0737e1
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -826,6 +826,7 @@ static int install_loader_config(const char *esp_path) {
}
fprintf(f, "#timeout 3\n");
fprintf(f, "#console-mode keep\n");
fprintf(f, "default %s-*\n", sd_id128_to_string(machine_id, machine_string));
r = fflush_sync_and_check(f);
+2
View File
@@ -194,6 +194,8 @@ int boot_loader_read_conf(const char *path, BootConfig *config) {
r = free_and_strdup(&config->timeout, p);
else if (streq(buf, "editor"))
r = free_and_strdup(&config->editor, p);
else if (streq(buf, "console-mode"))
r = free_and_strdup(&config->console_mode, p);
else {
log_notice("%s:%u: Unknown line \"%s\"", path, line, buf);
continue;
+1
View File
@@ -40,6 +40,7 @@ typedef struct BootConfig {
char *default_pattern;
char *timeout;
char *editor;
char *console_mode;
char *entry_oneshot;
char *entry_default;