1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
8 typedef enum BootEntryTokenType
{
9 BOOT_ENTRY_TOKEN_MACHINE_ID
,
10 BOOT_ENTRY_TOKEN_OS_IMAGE_ID
,
11 BOOT_ENTRY_TOKEN_OS_ID
,
12 BOOT_ENTRY_TOKEN_LITERAL
,
13 BOOT_ENTRY_TOKEN_AUTO
,
16 bool boot_entry_token_valid(const char *p
);
18 int boot_entry_token_ensure(
20 const char *conf_root
, /* will be prefixed with root, typically /etc/kernel. */
21 sd_id128_t machine_id
,
22 bool machine_id_is_random
,
23 BootEntryTokenType
*type
, /* input and output */
24 char **token
); /* output, but do not pass uninitialized value. */
25 int boot_entry_token_ensure_at(
27 const char *conf_root
,
28 sd_id128_t machine_id
,
29 bool machine_id_is_random
,
30 BootEntryTokenType
*type
,
33 int parse_boot_entry_token_type(const char *s
, BootEntryTokenType
*type
, char **token
);
35 const char* boot_entry_token_type_to_string(BootEntryTokenType t
);