@@ -34,10 +34,10 @@ pub const BootServices = extern struct {
34
34
hdr : TableHeader ,
35
35
36
36
/// Raises a task's priority level and returns its previous level.
37
- _aiseTpl : * const fn (new_tpl : usize ) callconv (cc ) usize ,
37
+ _raiseTpl : * const fn (new_tpl : usize ) callconv (cc ) usize ,
38
38
39
39
/// Restores a task's priority level to its previous value.
40
- _estoreTpl : * const fn (old_tpl : usize ) callconv (cc ) void ,
40
+ _restoreTpl : * const fn (old_tpl : usize ) callconv (cc ) void ,
41
41
42
42
/// Allocates memory pages from the system.
43
43
_allocatePages : * const fn (alloc_type : AllocateType , mem_type : MemoryType , pages : usize , memory : * [* ]align (4096 ) u8 ) callconv (cc ) Status ,
@@ -46,7 +46,7 @@ pub const BootServices = extern struct {
46
46
_freePages : * const fn (memory : [* ]align (4096 ) u8 , pages : usize ) callconv (cc ) Status ,
47
47
48
48
/// Returns the current memory map.
49
- _getMemoryMap : * const fn (mmap_size : * usize , mmap : [* ]MemoryDescriptor , map_key : * MemoryMapKey , descriptor_size : * usize , descriptor_version : * u32 ) callconv (cc ) Status ,
49
+ _getMemoryMap : * const fn (mmap_size : * usize , mmap : ? [* ]MemoryDescriptor , map_key : * MemoryMapKey , descriptor_size : * usize , descriptor_version : * u32 ) callconv (cc ) Status ,
50
50
51
51
/// Allocates pool memory.
52
52
_allocatePool : * const fn (pool_type : MemoryType , size : usize , buffer : * [* ]align (8 ) u8 ) callconv (cc ) Status ,
@@ -479,8 +479,7 @@ pub const BootServices = extern struct {
479
479
pub fn installProtocolInterface (
480
480
self : * BootServices ,
481
481
handle : ? Handle ,
482
- Interface : type ,
483
- interface : * const Interface ,
482
+ interface : anytype ,
484
483
) InstallProtocolInterfacesError ! Handle {
485
484
return self .installProtocolInterfaces (handle , .{
486
485
interface ,
@@ -509,7 +508,6 @@ pub const BootServices = extern struct {
509
508
pub fn uninstallProtocolInterface (
510
509
self : * BootServices ,
511
510
handle : Handle ,
512
- Interface : type ,
513
511
interface : * const Interface ,
514
512
) UninstallProtocolInterfacesError ! void {
515
513
return self .uninstallProtocolInterfaces (handle , .{
@@ -683,7 +681,11 @@ pub const BootServices = extern struct {
683
681
else = > | exit_code | exit_code ,
684
682
};
685
683
686
- if (exit_data_size == 0 ) return error .Unexpected ;
684
+ if (exit_data_size == 0 ) return .{
685
+ .code = exit_code ,
686
+ .description = null ,
687
+ .data = null ,
688
+ };
687
689
688
690
const description : [* :0 ]const u16 = @ptrCast (exit_data );
689
691
var description_len : usize = 0 ;
@@ -734,9 +736,10 @@ pub const BootServices = extern struct {
734
736
}
735
737
736
738
pub fn stall (self : * const BootServices , microseconds : usize ) uefi.UnexpectedError ! void {
737
- const status = self ._stall (microseconds );
738
- if (status != .success )
739
- return uefi .unexpectedStatus (status );
739
+ switch (self ._stall (microseconds )) {
740
+ .success = > {},
741
+ else = > | status | return uefi .unexpectedStatus (status ),
742
+ }
740
743
}
741
744
742
745
pub fn setWatchdogTimer (
@@ -1018,8 +1021,8 @@ pub const BootServices = extern struct {
1018
1021
1019
1022
pub const ImageExitData = struct {
1020
1023
code : Status ,
1021
- description : [:0 ]const u16 ,
1022
- data : []const u16 ,
1024
+ description : ? [:0 ]const u16 ,
1025
+ data : ? []const u16 ,
1023
1026
};
1024
1027
};
1025
1028
0 commit comments