Function getVariableSize [src]
Returns the length of the variable's data and its attributes.
Prototype
pub fn getVariableSize( self: *const RuntimeServices, name: [*:0]const u16, guid: *const Guid, ) GetVariableSizeError!?struct { usize, VariableAttributes }
Parameters
self: *const RuntimeServices
name: [*:0]const u16
guid: *const Guid
Possible Errors
Source
pub fn getVariableSize(
self: *const RuntimeServices,
name: [*:0]const u16,
guid: *const Guid,
) GetVariableSizeError!?struct { usize, VariableAttributes } {
var size: usize = 0;
var attrs: VariableAttributes = undefined;
switch (self._getVariable(
name,
guid,
&attrs,
&size,
null,
)) {
.buffer_too_small => return .{ size, attrs },
.not_found => return null,
.device_error => return error.DeviceError,
.unsupported => return error.Unsupported,
else => |status| return uefi.unexpectedStatus(status),
}
}