]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/efi-loader.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
10 int efi_reboot_to_firmware_supported(void);
11 int efi_get_reboot_to_firmware(void);
12 int efi_set_reboot_to_firmware(bool value
);
14 int efi_get_boot_option(uint16_t nr
, char **title
, sd_id128_t
*part_uuid
, char **path
, bool *active
);
15 int efi_add_boot_option(uint16_t id
, const char *title
, uint32_t part
, uint64_t pstart
, uint64_t psize
, sd_id128_t part_uuid
, const char *path
);
16 int efi_remove_boot_option(uint16_t id
);
17 int efi_get_boot_order(uint16_t **order
);
18 int efi_set_boot_order(uint16_t *order
, size_t n
);
19 int efi_get_boot_options(uint16_t **options
);
21 int efi_loader_get_device_part_uuid(sd_id128_t
*u
);
22 int efi_loader_get_boot_usec(usec_t
*firmware
, usec_t
*loader
);
24 int efi_loader_get_entries(char ***ret
);
26 int efi_loader_get_features(uint64_t *ret
);
28 int efi_loader_get_config_timeout_one_shot(usec_t
*ret
);
29 int efi_loader_update_entry_one_shot_cache(char **cache
, struct stat
*cache_stat
);
33 static inline int efi_reboot_to_firmware_supported(void) {
37 static inline int efi_get_reboot_to_firmware(void) {
41 static inline int efi_set_reboot_to_firmware(bool value
) {
45 static inline int efi_get_boot_option(uint16_t nr
, char **title
, sd_id128_t
*part_uuid
, char **path
, bool *active
) {
49 static inline int efi_add_boot_option(uint16_t id
, const char *title
, uint32_t part
, uint64_t pstart
, uint64_t psize
, sd_id128_t part_uuid
, const char *path
) {
53 static inline int efi_remove_boot_option(uint16_t id
) {
57 static inline int efi_get_boot_order(uint16_t **order
) {
61 static inline int efi_set_boot_order(uint16_t *order
, size_t n
) {
65 static inline int efi_get_boot_options(uint16_t **options
) {
69 static inline int efi_loader_get_device_part_uuid(sd_id128_t
*u
) {
73 static inline int efi_loader_get_boot_usec(usec_t
*firmware
, usec_t
*loader
) {
77 static inline int efi_loader_get_entries(char ***ret
) {
81 static inline int efi_loader_get_features(uint64_t *ret
) {
85 static inline int efi_loader_get_config_timeout_one_shot(usec_t
*ret
) {
89 static inline int efi_loader_update_entry_one_shot_cache(char **cache
, struct stat
*cache_stat
) {
95 bool efi_loader_entry_name_valid(const char *s
);
97 char *efi_tilt_backslashes(char *s
);