]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: synchronize bootctl code with sd-boot code 8086/head
authorHenrique Dante de Almeida <hdante@gmail.com>
Sun, 17 Dec 2017 00:52:05 +0000 (22:52 -0200)
committerHenrique Dante de Almeida <hdante@gmail.com>
Sat, 3 Feb 2018 19:37:21 +0000 (17:37 -0200)
This patch adds a line with "#console-mode keep" as a documentation for
the console mode feature and duplicates console-mode parsing to bootctl.

src/boot/bootctl.c
src/shared/bootspec.c
src/shared/bootspec.h

index ae034f5cdb1ba614072a78d2885bb27ea67ac917..a0453e077dc8dd3f0f7abf61c8815853312a6839 100644 (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);
index 9c3bdd47de45b8013ce38eb6aebdf4adf2d6df64..c0214b333e307168d551a708008ee3178c9ebfa7 100644 (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;
index d9c641bf081bb740e30d6ccbd91e66331bf5fb32..820688289a57b3fe5217a0844316d01f1f576c8c 100644 (file)
@@ -40,6 +40,7 @@ typedef struct BootConfig {
         char *default_pattern;
         char *timeout;
         char *editor;
+        char *console_mode;
 
         char *entry_oneshot;
         char *entry_default;