]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/bootspec: update valid loader.conf options 39165/head
authorFelix Pehla <29adc1fd92@gmail.com>
Mon, 29 Sep 2025 21:06:16 +0000 (23:06 +0200)
committerFelix Pehla <29adc1fd92@gmail.com>
Mon, 29 Sep 2025 21:46:59 +0000 (23:46 +0200)
src/boot/boot.c
src/shared/bootspec.c

index 69c3927e667ada9b0fa2eca3d4c479160ac541ea..3632f005c16794c7ac35981cab5cd3aff2550950 100644 (file)
@@ -1013,6 +1013,8 @@ static void config_defaults_load_from_file(Config *config, char *content) {
         assert(config);
         assert(content);
 
+        /* If you add, remove, or change an option name here, please also update
+         * shared/bootspec.c@boot_loader_read_conf() to make parsing by bootctl/logind/etc. work. */
         while ((line = line_get_key_value(content, " \t", &pos, &key, &value)))
                 if (streq8(key, "timeout")) {
                         if (streq8(value, "menu-disabled"))
@@ -1291,6 +1293,8 @@ static void boot_entry_add_type1(
                 .call = call_image_start,
         };
 
+        /* If you add, remove, or change an option name here, please also update shared/bootspec.c and
+         * shared/varlink-io.systemd.BootControl to make parsing by bootctl/logind/etc. work. */
         while ((line = line_get_key_value(content, " \t", &pos, &key, &value)))
                 if (streq8(key, "title")) {
                         free(entry->title);
@@ -1299,6 +1303,7 @@ static void boot_entry_add_type1(
                 } else if (streq8(key, "sort-key")) {
                         free(entry->sort_key);
                         entry->sort_key = xstr8_to_16(value);
+
                 } else if (streq8(key, "profile")) {
                         uint64_t u;
                         if (parse_number8(value, &u, NULL) && u <= UINT_MAX)
index 7bae3b00757ed7e4aa6a7921887e8f23aba7ebda..28baab981612cd3ec63ff78ccc7676bb026173b7 100644 (file)
@@ -517,7 +517,7 @@ int boot_loader_read_conf(BootConfig *config, FILE *file, const char *path) {
                 else if (STR_IN_SET(field, "timeout", "editor", "auto-entries", "auto-firmware",
                                     "auto-poweroff", "auto-reboot", "beep", "reboot-for-bitlocker",
                                     "reboot-on-error", "secure-boot-enroll", "secure-boot-enroll-action",
-                                    "console-mode"))
+                                    "secure-boot-enroll-timeout-sec", "console-mode", "log-level"))
                         r = 0; /* we don't parse these in userspace, but they are OK */
                 else {
                         log_syntax(NULL, LOG_WARNING, path, line, 0, "Unknown line '%s', ignoring.", field);