@@ -48,6 +48,9 @@ pub mod memchr {
4848 pub use core:: slice:: memchr:: { memchr, memrchr} ;
4949}
5050
51+ // SAFETY: must be called only once during runtime initialization.
52+ // SAFETY: argc must be 2.
53+ // SAFETY: argv must be &[Handle, *mut SystemTable].
5154pub unsafe fn init ( argc : isize , argv : * const * const u8 , _sigpipe : u8 ) {
5255 assert_eq ! ( argc, 2 ) ;
5356 let image_handle = unsafe { NonNull :: new ( * argv as * mut crate :: ffi:: c_void ) . unwrap ( ) } ;
@@ -66,10 +69,7 @@ pub const fn unsupported<T>() -> std_io::Result<T> {
6669
6770#[ inline]
6871pub const fn unsupported_err ( ) -> std_io:: Error {
69- std_io:: const_io_error!(
70- std_io:: ErrorKind :: Unsupported ,
71- "operation not supported on this platform" ,
72- )
72+ std_io:: const_io_error!( std_io:: ErrorKind :: Unsupported , "operation not supported on UEFI" , )
7373}
7474
7575pub fn decode_error_kind ( code : i32 ) -> crate :: io:: ErrorKind {
@@ -114,7 +114,7 @@ pub fn hashmap_random_keys() -> (u64, u64) {
114114 unsafe { ( get_random ( ) . unwrap_or ( 1 ) , get_random ( ) . unwrap_or ( 2 ) ) }
115115}
116116
117- unsafe fn get_random ( ) -> Option < u64 > {
117+ fn get_random ( ) -> Option < u64 > {
118118 use r_efi:: protocols:: rng;
119119
120120 let mut buf = [ 0u8 ; 8 ] ;
0 commit comments