diff options
author | Jan Janssen <medhefgo@web.de> | 2018-01-28 17:06:22 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2018-01-28 17:20:41 +0100 |
commit | c1d4e298bc5b80788ab0cbfdfc066140678612a8 (patch) | |
tree | 2c060e6d3f28cc350d0c309603b4f1d3bc3b82fe /src/shared | |
parent | 33d4ba32c93cba64832ce73c50cfd316200c0be3 (diff) | |
download | systemd-c1d4e298bc5b80788ab0cbfdfc066140678612a8.tar.gz |
systemd-boot: Make automatic entries configurable
Hiding automatic entries allows for giving custom entry names like
"Windows 10" instead of "Windows Boot Manager" by creating an appropriate
loader file in the loader/entries folder.
Note that it is already doable by renaming bootmgfw.efi (or the other auto-detected
boot loaders) and then using the renamed file for a custom entry. But windows will
automatically recreate the boot loader on updates, including the default EFI
bootloader entry if that one is missing.
Make hiding EFI reboot a separate option because there is no simple way to create
it with a custom loader entry and people may still want that around while still
hiding the other auto entries.
Also, turn no_editor into a positive boolean name while we're touching this code.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/bootspec.c | 6 | ||||
-rw-r--r-- | src/shared/bootspec.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 9c3bdd47de..8f3faeecb3 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -142,6 +142,8 @@ void boot_config_free(BootConfig *config) { free(config->default_pattern); free(config->timeout); free(config->editor); + free(config->auto_entries); + free(config->auto_firmware); free(config->entry_oneshot); free(config->entry_default); @@ -194,6 +196,10 @@ 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, "auto-entries")) + r = free_and_strdup(&config->auto_entries, p); + else if (streq(buf, "auto-firmware")) + r = free_and_strdup(&config->auto_firmware, 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..fe875454b1 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -40,6 +40,8 @@ typedef struct BootConfig { char *default_pattern; char *timeout; char *editor; + char *auto_entries; + char *auto_firmware; char *entry_oneshot; char *entry_default; |