69 size_t wname_len = ( (
wcslen ( wname ) + 1 ) *
sizeof ( wname[0] ) );
77 size =
sizeof ( buf[0] );
102 DBGC ( &
efivars,
"EFIVARS %s:%ls could not fetch next " 103 "variable name: %s\n",
111 if (
memcmp ( wname, buf, wname_len ) == 0 ) {
136 CHAR16 wname[ name_len + 1 ];
156 DBGC ( &
efivars,
"EFIVARS %s:%ls could not get size: %s\n",
175 DBGC ( &
efivars,
"EFIVARS %s:%ls could not get %zd bytes: " 227 DBGC ( &
efivars,
"EFIVARS could not register: %s\n",
struct arbelprm_rc_send_wqe rc
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
128 bit buffer containing a unique identifier value.
static int efivars_fetch(struct settings *settings __unused, struct setting *setting, void *data, size_t len)
Fetch value of EFI variable setting.
static struct settings_operations efivars_operations
EFI variable settings operations.
#define ENOENT
No such file or directory.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define EFI_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
static int efivars_find(const CHAR16 *wname, EFI_GUID *guid)
Find first matching EFI variable name.
size_t wcslen(const wchar_t *string)
Calculate length of wide-character string.
#define ENOMEM
Not enough space.
#define INIT_NORMAL
Normal initialisation.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define __unused
Declare a variable or data structure as unused.
An initialisation function.
static struct settings efivars
EFI variable settings.
int efi_snprintf(wchar_t *wbuf, size_t wsize, const char *fmt,...)
Write a formatted string to a buffer.
const struct setting_type * type
Setting type.
EFI_GET_VARIABLE GetVariable
uint32_t attrs
Extended attributes (optional)
EFI Runtime Services Table.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
void * zalloc(size_t size)
Allocate cleared memory.
static void efivars_init(void)
Initialise EFI variable settings.
size_t strlen(const char *src)
Get length of string.
Settings block operations.
UINT64 UINTN
Unsigned value of native width.
void * malloc(size_t size)
Allocate memory.
struct list_head siblings
Sibling settings blocks.
struct init_fn efivars_init_fn __init_fn(INIT_NORMAL)
EFI variable settings initialiser.
EFI_RUNTIME_SERVICES * RuntimeServices
A pointer to the EFI Runtime Services Table.
#define EFI_NOT_FOUND
Enumeration of EFI_STATUS.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName
uint8_t size
Entry size (in 32-bit words)
uint8_t data[48]
Additional event data.
static const struct settings_scope efivars_scope
EFI variable settings scope.
void * realloc(void *old_ptr, size_t new_size)
Reallocate memory.
int(* applies)(struct settings *settings, const struct setting *setting)
Check applicability of setting.
struct list_head children
Child settings blocks.
int register_settings(struct settings *settings, struct settings *parent, const char *name)
Register settings block.
EFI_SYSTEM_TABLE * efi_systab
static int efivars_applies(struct settings *settings __unused, const struct setting *setting)
Check applicability of EFI variable setting.
#define LIST_HEAD_INIT(list)
Initialise a static list head.
const struct settings_scope * scope
Setting scope (or NULL)
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
struct refcnt * refcnt
Reference counter.