efivar_entry_set_get_size(9)
π efivar_entry_set_get_size(9) π
okay so bestie, we're in the Kernel API Manual and this page is all about one very special (and lowkey complex) function. no cap, it's giving atomic setter-plus-size-getter energy. π¦
π NAME π
efivar_entry_set_get_size β call set_variable() and get new size (atomic). β¨
β¨ SYNOPSIS β¨
int efivar_entry_set_get_size (struct efivar_entry *entry , u32
attributes , unsigned long *size , void *data , bool *set );
π ARGUMENTS π
entryβ entry containing variable to set and get. πattributesβ attributes of variable to be written. πsizeβ size of data buffer. π¦dataβ buffer containing data to write. πsetβ did theset_variablecall succeed? (that's the question, bestie) π
π DESCRIPTION π
okay so real talk: this is a pretty special (complex) function. See efivarfs_file_write. π₯
It atomically calls set_variable for entry, and if the call is successful, returns the new size of the variable from get_variable in size. The success of set_variable is indicated by set. periodt. π
Returns 0 on success, -EINVAL if the variable data is invalid, -ENOSPC if the firmware does not have enough available space, or a converted EFI status code if either of set_variable or get_variable fail.
and heads up: if the EFI variable does not exist when calling set_variable (EFI_NOT_FOUND). πΈ
π SEE ALSO π
Kernel file ./fs/efivarfs/vars.c is the homegirl here, and the besties are:
efivar_init(9)efivar_entry_delete(9)efivar_entry_size(9)__efivar_entry_get(9)efivar_entry_get(9)
xoxo, your local Unix bestie π source/version: ./fs/efivarfs Β· date: October 2026 Β· for efivar_entry_set_get_size(9) πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms