Function loadImage [src]

Prototype

pub fn loadImage( self: *BootServices, boot_policy: bool, parent_image: Handle, source: LoadImageSource, ) LoadImageError!Handle

Parameters

self: *BootServicesboot_policy: boolparent_image: Handlesource: LoadImageSource

Possible Errors

AccessDenied
DeviceError
InvalidParameter
LoadError
NotFound
OutOfResources
SecurityViolation
Unexpected UnexpectedError
Unsupported

Source

pub fn loadImage( self: *BootServices, boot_policy: bool, parent_image: Handle, source: LoadImageSource, ) LoadImageError!Handle { var handle: Handle = undefined; switch (self._loadImage( boot_policy, parent_image, if (source == .device_path) source.device_path else null, if (source == .buffer) source.buffer.ptr else null, if (source == .buffer) source.buffer.len else 0, &handle, )) { .success => return handle, .not_found => return error.NotFound, .invalid_parameter => return error.InvalidParameter, .unsupported => return error.Unsupported, .out_of_resources => return error.OutOfResources, .load_error => return error.LoadError, .device_error => return error.DeviceError, .access_denied => return error.AccessDenied, .security_violation => return error.SecurityViolation, else => |status| return uefi.unexpectedStatus(status), } }