std/os/uefi: change type of Handle from @OpaqueType to *@OpaqueType

This commit is contained in:
Nick Erdmann 2019-08-09 23:12:59 +02:00
parent 88fdb303ff
commit 9445b3f057
No known key found for this signature in database
GPG Key ID: C174038EAF6578B2
5 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@ pub const tables = @import("uefi/tables.zig");
const builtin = @import("builtin");
pub const is_the_target = builtin.os == .uefi;
pub var handle: *Handle = undefined;
pub var handle: Handle = undefined;
pub var system_table: *tables.SystemTable = undefined;
pub const Event = @OpaqueType();
@ -18,7 +18,7 @@ pub const Guid = extern struct {
clock_seq_low: u8,
node: [6]u8,
};
pub const Handle = @OpaqueType();
pub const Handle = *@OpaqueType();
pub const Time = extern struct {
year: u16,
month: u8,

View File

@ -4,10 +4,10 @@ const Handle = uefi.Handle;
/// UEFI Specification, Version 2.8, 12.9
pub const EdidOverrideProtocol = extern struct {
_get_edid: extern fn (*const EdidOverrideProtocol, *const Handle, *u32, *usize, *?[*]u8) usize,
_get_edid: extern fn (*const EdidOverrideProtocol, Handle, *u32, *usize, *?[*]u8) usize,
/// attributes must be align(4)
pub fn getEdid(self: *const EdidOverrideProtocol, handle: *const Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {
pub fn getEdid(self: *const EdidOverrideProtocol, handle: Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize {
return self._get_edid(self, handle, attributes, edid_size, edid);
}

View File

@ -39,7 +39,7 @@ pub const BootServices = extern struct {
installConfigurationTable: usize, // TODO
imageLoad: usize, // TODO
imageStart: usize, // TODO
exit: extern fn (*const Handle, usize, usize, ?*const c_void) usize,
exit: extern fn (Handle, usize, usize, ?*const c_void) usize,
imageUnload: usize, // TODO
exitBootServices: usize, // TODO
getNextMonotonicCount: usize, // TODO

View File

@ -19,11 +19,11 @@ pub const SystemTable = extern struct {
hdr: TableHeader,
firmware_vendor: *u16,
firmware_revision: u32,
console_in_handle: ?*Handle,
console_in_handle: ?Handle,
con_in: ?*SimpleTextInputExProtocol,
console_out_handle: ?*Handle,
console_out_handle: ?Handle,
con_out: ?*SimpleTextOutputProtocol,
standard_error_handle: ?*Handle,
standard_error_handle: ?Handle,
std_err: ?*SimpleTextOutputProtocol,
runtime_services: *RuntimeServices,
boot_services: ?*BootServices,

View File

@ -31,7 +31,7 @@ extern fn wasm_freestanding_start() void {
_ = callMain();
}
extern fn EfiMain(handle: *uefi.Handle, system_table: *uefi.tables.SystemTable) usize {
extern fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) usize {
const bad_efi_main_ret = "expected return type of main to be 'void', 'noreturn', or 'usize'";
uefi.handle = handle;
uefi.system_table = system_table;