Skip to content

Variable policy

variable_policy

Module containing helper classes and functions to work with Variable Policy structures and substructures.

VariableLockOnVarStatePolicy

Object representing the Lock on var state policy c struct.

typedef struct { EFI_GUID Namespace; UINT8 Value; UINT8 Reserved; // CHAR16 Name[]; // Variable Length Field } VARIABLE_LOCK_ON_VAR_STATE_POLICY;

__init__

__init__() -> VariableLockOnVarStatePolicy

Initializes the Variable Lock On Var State Policy.

__str__

__str__() -> str

String representation of the object.

decode

decode(buffer: IO) -> bytes

Load this object from a bytes buffer.

Returns:

Type Description
obj

any remaining buffer

VariablePolicyEntry

Object representing the Variable Policy C struct.

Example

typedef struct { UINT32 Version; UINT16 Size; UINT16 OffsetToName; EFI_GUID Namespace; UINT32 MinSize; UINT32 MaxSize; UINT32 AttributesMustHave; UINT32 AttributesCantHave; UINT8 LockPolicyType; UINT8 Reserved[3]; // UINT8 LockPolicy[]; // Variable Length Field // CHAR16 Name[] // Variable Length Field } VARIABLE_POLICY_ENTRY;

__init__

__init__() -> VariablePolicyEntry

Initializes the Variable Policy Entry.

__str__

__str__() -> str

String representation of the object.

csv_header staticmethod

csv_header() -> list

Returns a list containing the names of the ordered columns that are produced by csv_row().

csv_row

csv_row(guid_xref: dict = None) -> list

Returns a list containing the elements of this structure.

(in the same order as the csv_header) ready to be written to a csv file Args: guid_xref (dict): GUID/name substitutions where the key is a uuid object and the value is a string

decode

decode(buffer: IO) -> bytes

Load this object from a bytes buffer.

Returns:

Type Description
bytes

Any remaining buffer