Skip to content

Variablestore manulipulations

variablestore_manulipulations

Contains classes and helper functions to modify variables in a UEFI ROM image.

VariableStore

Class representing the variable store.

__init__

__init__(
    romfile: str,
    store_base: Optional[int] = None,
    store_size: Optional[int] = None,
) -> VariableStore

Initialize the Variable store and read necessary files.

Loads the data.

__del__

__del__() -> None

Flushes and closes files.

get_new_var_class

get_new_var_class() -> (
    VF.VariableHeader | VF.AuthenticatedVariableHeader
)

Var class builder method depending on var type.

add_variable

add_variable(
    new_var: (
        VF.VariableHeader | VF.AuthenticatedVariableHeader
    ),
) -> None

Add a variable to the variable list.

flush_to_file

flush_to_file() -> None

Flush the changes to file.