]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/bootspec.h
2 This file is part of systemd.
4 Copyright 2017 Zbigniew Jędrzejewski-Szmek
11 typedef struct BootEntry
{
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_entry_free(BootEntry
*entry
);
43 int boot_entry_load(const char *path
, BootEntry
*entry
);
44 int boot_entries_find(const char *dir
, BootEntry
**entries
, size_t *n_entries
);
46 int boot_loader_read_conf(const char *path
, BootConfig
*config
);
47 void boot_config_free(BootConfig
*config
);
48 int boot_entries_load_config(const char *esp_path
, BootConfig
*config
);
50 static inline const char* boot_entry_title(const BootEntry
*entry
) {
51 return entry
->show_title
?: entry
->title
?: entry
->filename
;
54 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
);