summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrique Dante de Almeida <hdante@gmail.com>2017-12-16 22:52:05 -0200
committerHenrique Dante de Almeida <hdante@gmail.com>2018-02-03 17:37:21 -0200
commitd37b0737e14ca3539e6962c48953df135533cea6 (patch)
treeea4270c55947f74335fb68359f99867d9b85f606 /src
parent26e51d87f7b9c50cc215dc9ccc78fa99f5225a82 (diff)
downloadsystemd-d37b0737e14ca3539e6962c48953df135533cea6.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/boot/bootctl.c1
-rw-r--r--src/shared/bootspec.c2
-rw-r--r--src/shared/bootspec.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index ae034f5cdb..a0453e077d 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -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);
diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c
index 9c3bdd47de..c0214b333e 100644
--- a/src/shared/bootspec.c
+++ b/src/shared/bootspec.c
@@ -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;
diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h
index d9c641bf08..820688289a 100644
--- a/src/shared/bootspec.h
+++ b/src/shared/bootspec.h
@@ -40,6 +40,7 @@ typedef struct BootConfig {
char *default_pattern;
char *timeout;
char *editor;
+ char *console_mode;
char *entry_oneshot;
char *entry_default;