Function get_variable

Source
pub fn get_variable<T: UefiVariable + 'static>(
    name: &CStr16,
    vendor: Option<VariableVendor>,
) -> BootResult<T>
Expand description

Gets a UEFI variable of a UefiVariable given the name

If None is specified for the vendor, then the variable will be searched for in a custom GUID space, not the global variables vendor space. In other words, unless you are storing your own variables, it may not be what you expect.

This custom namespace is accessible at GUID 23600d08-561e-4e68-a024-1d7d6e04ee4e.

If the variable was not found, a default value of 0 will be returned. This is more convenient to handle internally as its easier to not handle specially the case of the variable not being found.

ยงErrors

May return an Error for many reasons, see runtime::get_variable