summaryrefslogtreecommitdiffstats
path: root/src/shared/bootspec.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
commit78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch)
treef515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/shared/bootspec.h
parentAdding debian version 255.5-1. (diff)
downloadsystemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz
systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/bootspec.h')
-rw-r--r--src/shared/bootspec.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h
index ddd149e..1885a88 100644
--- a/src/shared/bootspec.h
+++ b/src/shared/bootspec.h
@@ -20,6 +20,18 @@ typedef enum BootEntryType {
_BOOT_ENTRY_TYPE_INVALID = -EINVAL,
} BootEntryType;
+typedef struct BootEntryAddon {
+ char *location;
+ char *cmdline;
+} BootEntryAddon;
+
+typedef struct BootEntryAddons {
+ BootEntryAddon *items;
+ size_t n_items;
+} BootEntryAddons;
+
+BootEntryAddon* boot_entry_addon_free(BootEntryAddon *t);
+
typedef struct BootEntry {
BootEntryType type;
bool reported_by_loader;
@@ -34,6 +46,7 @@ typedef struct BootEntry {
char *machine_id;
char *architecture;
char **options;
+ BootEntryAddons local_addons;
char *kernel; /* linux is #defined to 1, yikes! */
char *efi;
char **initrd;
@@ -52,12 +65,6 @@ typedef struct BootEntry {
typedef struct BootConfig {
char *default_pattern;
- char *timeout;
- char *editor;
- char *auto_entries;
- char *auto_firmware;
- char *console_mode;
- char *beep;
char *entry_oneshot;
char *entry_default;
@@ -66,6 +73,8 @@ typedef struct BootConfig {
BootEntry *entries;
size_t n_entries;
+ BootEntryAddons global_addons;
+
ssize_t default_entry;
ssize_t selected_entry;
@@ -119,6 +128,7 @@ static inline const char* boot_entry_title(const BootEntry *entry) {
int show_boot_entry(
const BootEntry *e,
+ const BootEntryAddons *global_addons,
bool show_as_default,
bool show_as_selected,
bool show_reported);
@@ -127,3 +137,5 @@ int show_boot_entries(
JsonFormatFlags json_format);
int boot_filename_extract_tries(const char *fname, char **ret_stripped, unsigned *ret_tries_left, unsigned *ret_tries_done);
+
+int boot_entry_to_json(const BootConfig *c, size_t i, JsonVariant **ret);