LIBEFIVAR(3)
β¨ NAME β¨
hii bestie!! welcome to libefivar(3) from the Library Functions Manual β this one is literally all about EFI Non Volatile Variable Support. π
πΈ SYNOPSIS πΈ
#include <efivar.h>
int
efi_append_variable(efi_guid_t guid, const char *name, void *data,
size_t data_size, uint32_t attributes);
int
efi_del_variable(efi_guid_t guid, const char *name);
int
efi_get_variable(efi_guid_t guid, const char *name, void **data,
ssize_t *data_size, uint32_t *attributes);
int
efi_get_variable_attributes(efi_guid_t guid, const char *name,
uint32_t *attributes);
int
efi_get_variable_size(efi_guid_t guid, const char *name, size_t *size);
int
efi_get_next_variable_name(efi_guid_t **guid, char **name);
int
efi_guid_to_name(efi_guid_t *guid, char **name);
int
efi_guid_to_symbol(efi_guid_t *guid, char **symbol);
int
efi_guid_to_str(const efi_guid_t *guid, char **sp);
int
efi_name_to_guid(const char *name, efi_guid_t *guid);
int
efi_set_variable(efi_guid_t guid, const char *name, void *data,
size_t data_size, uint32_t attributes);
int
efi_str_to_guid(const char *s, efi_guid_t *guid);
int
efi_variables_supported(void);
π DESCRIPTION π
okay so the libefivar library implements access to EFI Variables via the EFI Runtime Services. All char * strings are converted to 16-bit UTF strings before passing them to EFI. that part is important, bestie β donβt forget it. π
efi_variables_supported() returns non-zero if the current machine supports setting of EFI firmware variables and the kernel support for doing so is present. otherwise, zero is returned. thatβs the vibe check for βcan we even do this?β β¨
efi_del_variable() deletes the EFI variable selected by guid and name. bye-bye, variable. π«Ά
the following functions have not been implemented yet:
efi_append_variable()efi_get_next_variable_name()efi_get_variable()efi_get_variable_attributes()efi_get_variable_size()efi_guid_to_name()efi_guid_to_str()efi_guid_to_symbol()efi_name_to_guid()efi_set_variable()efi_str_to_guid()
π¨ plot twist: that list is real. they are not implemented yet. no cap. π
π¦ SEE ALSO π¦
efidev(4) β go look at that one too, bestie. π
π HISTORY π
the libefivar library first appeared in FreeBSD 12.0. iconic debut behavior, honestly. β¨
π AUTHORS π
this software was originally written by Warner Losh. shoutout to the main character who wrote it. π«Ά
π BUGS π
no facilities exist to process the strings as native UTF. this is a limitation in the Linux libefivar library interface. π
xoxo, this cutie came from Debian, dated October 25, 2018 β periodt. π π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2016 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms