File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ impl<'boot> Pointer<'boot> {
61
61
#[ derive( Debug , Copy , Clone ) ]
62
62
#[ repr( C ) ]
63
63
pub struct PointerMode {
64
- // The pointer device's resolution on the X/Y/Z axis in counts/mm.
65
- // If a value is 0, then the device does _not_ support that axis.
66
- resolution : ( u64 , u64 , u64 ) ,
64
+ /// The pointer device's resolution on the X/Y/Z axis in counts/mm.
65
+ /// If a value is 0, then the device does _not_ support that axis.
66
+ pub resolution : ( u64 , u64 , u64 ) ,
67
67
/// Whether the devices has a left button / right button.
68
- has_button : ( bool , bool ) ,
68
+ pub has_button : ( bool , bool ) ,
69
69
}
70
70
71
71
/// The relative change in the pointer's state.
Original file line number Diff line number Diff line change @@ -96,7 +96,12 @@ pub struct BootServices {
96
96
exit_data_size : * mut usize ,
97
97
exit_data : & mut * mut Char16 ,
98
98
) -> Status ,
99
- exit : usize ,
99
+ exit : extern "efiapi" fn (
100
+ image_handle : Handle ,
101
+ exit_status : Status ,
102
+ exit_data_size : usize ,
103
+ exit_data : * mut Char16 ,
104
+ ) -> !,
100
105
unload_image : extern "efiapi" fn ( image_handle : Handle ) -> Status ,
101
106
exit_boot_services :
102
107
unsafe extern "efiapi" fn ( image_handle : Handle , map_key : MemoryMapKey ) -> Status ,
@@ -485,6 +490,25 @@ impl BootServices {
485
490
}
486
491
}
487
492
493
+ /// Exits the UEFI application and returns control to the UEFI component
494
+ /// that started the UEFI application.
495
+ ///
496
+ /// # Safety
497
+ ///
498
+ /// This function is unsafe because it is up to the caller to ensure that
499
+ /// all resources allocated by the application is freed before invoking
500
+ /// exit and returning control to the UEFI component that started the UEFI
501
+ /// application.
502
+ pub unsafe fn exit (
503
+ & self ,
504
+ image_handle : Handle ,
505
+ exit_status : Status ,
506
+ exit_data_size : usize ,
507
+ exit_data : * mut Char16 ,
508
+ ) -> ! {
509
+ ( self . exit ) ( image_handle, exit_status, exit_data_size, exit_data)
510
+ }
511
+
488
512
/// Exits the UEFI boot services
489
513
///
490
514
/// This unsafe method is meant to be an implementation detail of the safe
You can’t perform that action at this time.
0 commit comments