]>
git.proxmox.com Git - systemd.git/blob - src/shared/bootspec.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
11 typedef struct BootEntry
{
12 char *id
; /* This is the file basename without extension */
13 char *path
; /* This is the full path to the file */
20 char *kernel
; /* linux is #defined to 1, yikes! */
26 typedef struct BootConfig
{
27 char *default_pattern
;
39 ssize_t default_entry
;
42 void boot_config_free(BootConfig
*config
);
43 int boot_entries_load_config(const char *esp_path
, BootConfig
*config
);
45 static inline const char* boot_entry_title(const BootEntry
*entry
) {
46 return entry
->show_title
?: entry
->title
?: entry
->id
;
49 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
);
51 int find_default_boot_entry(const char *esp_path
, char **esp_where
, BootConfig
*config
, const BootEntry
**e
);