Function nvData [src]
Performs read and write operations on the NVRAM device attached to a network interface.
Prototype
pub fn nvData( self: *SimpleNetwork, read_write: NvDataOperation, offset: usize, buffer: []u8, ) NvDataError!void
Parameters
self: *SimpleNetwork
read_write: NvDataOperation
offset: usize
buffer: []u8
Possible Errors
Source
pub fn nvData(
self: *SimpleNetwork,
read_write: NvDataOperation,
offset: usize,
buffer: []u8,
) NvDataError!void {
switch (self._nvdata(
self,
// if ReadWrite is TRUE, a read operation is performed
read_write == .read,
offset,
buffer.len,
buffer.ptr,
)) {
.success => {},
.not_started => return Error.NotStarted,
.invalid_parameter => return Error.InvalidParameter,
.device_error => return Error.DeviceError,
.unsupported => return Error.Unsupported,
else => |status| return uefi.unexpectedStatus(status),
}
}