Debian Codegraph @

src/bootctl/bootspec-util.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "bootspec.h"
5
6 int boot_config_load_and_select(BootConfig *config, const char *root, const char *esp_path, dev_t esp_devid, const char *xbootldr_path, dev_t xbootldr_devid);
7
8 static inline bool entry_commit_valid(uint64_t commit) {
9 return commit > 0 && commit < UINT64_MAX;
10 }
11
12 int boot_entry_make_commit_filename(const char *entry_token, uint64_t entry_commit, const char *version, unsigned profile_nr, unsigned tries_left, char **ret);
13
14 int boot_entry_parse_commit_filename(const char *filename, char **ret_entry_token, uint64_t *ret_entry_commit);
15
16 int boot_entry_parse_commit(BootEntry *entry, char **ret_entry_token, uint64_t *ret_entry_commit);
17
18 int boot_config_find_oldest_commit(BootConfig *config, const char *entry_token, char ***ret_ids);