Function closeProtocol [src]

Prototype

pub fn closeProtocol( self: *BootServices, handle: Handle, Protocol: type, agent: Handle, controller: ?Handle, ) CloseProtocolError!void

Parameters

self: *BootServiceshandle: HandleProtocol: typeagent: Handlecontroller: ?Handle

Possible Errors

InvalidParameter
NotFound
Unexpected UnexpectedError

Source

pub fn closeProtocol( self: *BootServices, handle: Handle, Protocol: type, agent: Handle, controller: ?Handle, ) CloseProtocolError!void { if (!@hasDecl(Protocol, "guid")) @compileError("protocol is missing guid: " ++ @typeName(Protocol)); switch (self._closeProtocol( handle, &Protocol.guid, agent, controller, )) { .success => {}, .invalid_parameter => return error.InvalidParameter, .not_found => return error.NotFound, else => |status| return uefi.unexpectedStatus(status), } }