1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <efi.h>
5 #include <errno.h>
6 
7 typedef enum RandomSeedMode {
8         RANDOM_SEED_OFF,
9         RANDOM_SEED_WITH_SYSTEM_TOKEN,
10         RANDOM_SEED_ALWAYS,
11         _RANDOM_SEED_MODE_MAX,
12         _RANDOM_SEED_MODE_INVALID = -EINVAL,
13 } RandomSeedMode;
14 
15 static const CHAR16 * const random_seed_modes_table[_RANDOM_SEED_MODE_MAX] = {
16         [RANDOM_SEED_OFF]               = L"off",
17         [RANDOM_SEED_WITH_SYSTEM_TOKEN] = L"with-system-token",
18         [RANDOM_SEED_ALWAYS]            = L"always",
19 };
20 
21 EFI_STATUS process_random_seed(EFI_FILE *root_dir, RandomSeedMode mode);
22