]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/bootspec.h
2 Copyright 2017 Zbigniew Jędrzejewski-Szmek
9 typedef struct BootEntry
{
18 char *kernel
; /* linux is #defined to 1, yikes! */
24 typedef struct BootConfig
{
25 char *default_pattern
;
37 ssize_t default_entry
;
40 void boot_entry_free(BootEntry
*entry
);
41 int boot_entry_load(const char *path
, BootEntry
*entry
);
42 int boot_entries_find(const char *dir
, BootEntry
**entries
, size_t *n_entries
);
44 int boot_loader_read_conf(const char *path
, BootConfig
*config
);
45 void boot_config_free(BootConfig
*config
);
46 int boot_entries_load_config(const char *esp_path
, BootConfig
*config
);
48 static inline const char* boot_entry_title(const BootEntry
*entry
) {
49 return entry
->show_title
?: entry
->title
?: entry
->filename
;
52 int find_esp_and_warn(const char *path
, bool unprivileged_mode
, char **ret_path
, uint32_t *ret_part
, uint64_t *ret_pstart
, uint64_t *ret_psize
, sd_id128_t
*ret_uuid
);