iPXE
|
EFI variable settings. More...
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ipxe/settings.h>
#include <ipxe/init.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/efi_strings.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | efivars_applies (struct settings *settings __unused, const struct setting *setting) |
Check applicability of EFI variable setting. More... | |
static int | efivars_find (const CHAR16 *wname, EFI_GUID *guid) |
Find first matching EFI variable name. More... | |
static int | efivars_fetch (struct settings *settings __unused, struct setting *setting, void *data, size_t len) |
Fetch value of EFI variable setting. More... | |
static void | efivars_init (void) |
Initialise EFI variable settings. More... | |
struct init_fn efivars_init_fn | __init_fn (INIT_NORMAL) |
EFI variable settings initialiser. More... | |
Variables | |
static const struct settings_scope | efivars_scope |
EFI variable settings scope. More... | |
static struct settings | efivars |
EFI variable settings. More... | |
static struct settings_operations | efivars_operations |
EFI variable settings operations. More... | |
EFI variable settings.
Definition in file efi_settings.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Check applicability of EFI variable setting.
settings | Settings block |
setting | Setting |
applies | Setting applies within this settings block |
Definition at line 54 of file efi_settings.c.
References efivars_scope, and setting::scope.
Find first matching EFI variable name.
wname | Name |
guid | GUID to fill in |
rc | Return status code |
Definition at line 67 of file efi_settings.c.
References DBGC, DBGC2, EEFI, EFI_BUFFER_TOO_SMALL, efi_guid_ntoa(), EFI_NOT_FOUND, efi_systab, efivars, ENOENT, ENOMEM, free, EFI_RUNTIME_SERVICES::GetNextVariableName, guid, memcmp(), rc, realloc(), EFI_SYSTEM_TABLE::RuntimeServices, size, strerror(), tmp, wcslen(), and zalloc().
Referenced by efivars_fetch().
|
static |
Fetch value of EFI variable setting.
settings | Settings block |
setting | Setting to fetch |
data | Buffer to fill with setting data |
len | Length of buffer |
len | Length of setting data, or negative error |
Definition at line 132 of file efi_settings.c.
References attrs, data, DBGC, DBGC_HDA, EEFI, EFI_BUFFER_TOO_SMALL, efi_guid_ntoa(), efi_snprintf(), efi_systab, efivars, efivars_find(), ENOMEM, free, EFI_RUNTIME_SERVICES::GetVariable, guid, len, malloc(), memcpy(), setting::name, NULL, rc, EFI_SYSTEM_TABLE::RuntimeServices, size, strerror(), strlen(), and setting::type.
|
static |
Initialise EFI variable settings.
Definition at line 222 of file efi_settings.c.
References DBGC, efivars, NULL, rc, register_settings(), and strerror().
struct init_fn efivars_init_fn __init_fn | ( | INIT_NORMAL | ) |
EFI variable settings initialiser.
|
static |
EFI variable settings scope.
Definition at line 42 of file efi_settings.c.
Referenced by efivars_applies().
|
static |
EFI variable settings.
Definition at line 45 of file efi_settings.c.
Referenced by efivars_fetch(), efivars_find(), and efivars_init().
|
static |
EFI variable settings operations.
Definition at line 204 of file efi_settings.c.