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 RuntimeServicesname: [*:0]const u16guid: *const Guid

Possible Errors

DeviceError
Unexpected UnexpectedError
Unsupported

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), } }