Function locateHandleLen [src]

Returns the number of handles that match the given search criteria.

Prototype

pub fn locateHandleLen(self: *const BootServices, search: LocateSearch) NumHandlesError!usize

Parameters

self: *const BootServicessearch: LocateSearch

Possible Errors

OutOfResources
Unexpected UnexpectedError

Source

pub fn locateHandleLen(self: *const BootServices, search: LocateSearch) NumHandlesError!usize { var len: usize = 0; switch (self._locateHandle( std.meta.activeTag(search), if (search == .by_protocol) search.by_protocol else null, if (search == .by_register_notify) search.by_register_notify else null, &len, null, )) { .success => return @divExact(len, @sizeOf(Handle)), .out_of_resources => return error.OutOfResources, else => |status| return uefi.unexpectedStatus(status), } }