Function startImage [src]

Prototype

pub fn startImage(self: *BootServices, image: Handle) StartImageError!ImageExitData

Parameters

self: *BootServicesimage: Handle

Possible Errors

InvalidParameter
SecurityViolation
Unexpected UnexpectedError

Source

pub fn startImage(self: *BootServices, image: Handle) StartImageError!ImageExitData { var exit_data_size: usize = undefined; var exit_data: [*]u16 = undefined; const exit_code = switch (self._startImage( image, &exit_data_size, &exit_data, )) { .invalid_parameter => return error.InvalidParameter, .security_violation => return error.SecurityViolation, else => |exit_code| exit_code, }; if (exit_data_size == 0) return .{ .code = exit_code, .description = null, .data = null, }; const description_ptr: [*:0]const u16 = @ptrCast(exit_data); const description = std.mem.sliceTo(description_ptr, 0); return ImageExitData{ .code = exit_code, .description = description, .data = exit_data[description.len + 1 .. exit_data_size], }; }