Function reinstallProtocolInterface [src]

Reinstalls a protocol interface on a device handle. new may be the same as old. If it is, the registered protocol notifications occur for the handle without replacing the interface on the handle. Any process that has registered to wait for the installation of the interface is notified. The caller is responsible for ensuring that there are no references to old if it is being removed.

Prototype

pub fn reinstallProtocolInterface( self: *BootServices, handle: Handle, Protocol: type, old: ?*const Protocol, new: ?*const Protocol, ) ReinstallProtocolInterfaceError!void

Parameters

self: *BootServiceshandle: HandleProtocol: typeold: ?*const Protocolnew: ?*const Protocol

Possible Errors

AccessDenied
InvalidParameter
NotFound
Unexpected UnexpectedError

Source

pub fn reinstallProtocolInterface( self: *BootServices, handle: Handle, Protocol: type, old: ?*const Protocol, new: ?*const Protocol, ) ReinstallProtocolInterfaceError!void { if (!@hasDecl(Protocol, "guid")) @compileError("protocol is missing guid"); switch (self._reinstallProtocolInterface( handle, &Protocol.guid, old, new, )) { .success => {}, .not_found => return error.NotFound, .access_denied => return error.AccessDenied, .invalid_parameter => return error.InvalidParameter, else => |status| return uefi.unexpectedStatus(status), } }