diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-20 17:58:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-11-07 15:14:23 +0100 |
commit | 64f05708cf10f4a0f85ae0301e101c67ec87ba7a (patch) | |
tree | 5b31ad37330f65bbc657ef7d04b202eb6aaa0fb8 /src/shared/bootspec.h | |
parent | 7e87c7d9149cb06a0e4cbe24e808edd906f71fc6 (diff) | |
download | systemd-64f05708cf10f4a0f85ae0301e101c67ec87ba7a.tar.gz |
bootctl: show unique titles
Diffstat (limited to 'src/shared/bootspec.h')
-rw-r--r-- | src/shared/bootspec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index ff2b90cd32..b45fdafd70 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -25,6 +25,7 @@ typedef struct BootEntry { char *filename; char *title; + char *show_title; char *version; char *machine_id; char *architecture; @@ -56,3 +57,7 @@ int boot_entries_select_default(const BootConfig *config); int boot_loader_read_conf(const char *path, BootConfig *config); void boot_config_free(BootConfig *config); int boot_entries_load_config(const char *esp_path, BootConfig *config); + +static inline const char* boot_entry_title(const BootEntry *entry) { + return entry->show_title ?: entry->title ?: entry->filename; +} |