2
2
3
3
use super :: { Header , Revision } ;
4
4
use crate :: data_types:: { Align , PhysicalAddress } ;
5
- use crate :: proto:: device_path:: { DevicePath , FfiDevicePath } ;
5
+ use crate :: proto:: device_path:: DevicePath ;
6
6
use crate :: proto:: { Protocol , ProtocolPointer } ;
7
7
use crate :: { Char16 , Event , Guid , Handle , Result , Status , StatusExt } ;
8
8
use core:: cell:: UnsafeCell ;
@@ -130,7 +130,7 @@ struct BootServicesInternal {
130
130
) -> Status ,
131
131
locate_device_path : unsafe extern "efiapi" fn (
132
132
proto : & Guid ,
133
- device_path : & mut * const FfiDevicePath ,
133
+ device_path : * mut * const uefi_raw :: protocol :: device_path :: DevicePathProtocol ,
134
134
out_handle : & mut Option < Handle > ,
135
135
) -> Status ,
136
136
install_configuration_table :
@@ -140,7 +140,7 @@ struct BootServicesInternal {
140
140
load_image : unsafe extern "efiapi" fn (
141
141
boot_policy : u8 ,
142
142
parent_image_handle : Handle ,
143
- device_path : * const FfiDevicePath ,
143
+ device_path : * const uefi_raw :: protocol :: device_path :: DevicePathProtocol ,
144
144
source_buffer : * const u8 ,
145
145
source_size : usize ,
146
146
image_handle : & mut Option < Handle > ,
@@ -173,7 +173,7 @@ struct BootServicesInternal {
173
173
connect_controller : unsafe extern "efiapi" fn (
174
174
controller : Handle ,
175
175
driver_image : Option < Handle > ,
176
- remaining_device_path : * const FfiDevicePath ,
176
+ remaining_device_path : * const uefi_raw :: protocol :: device_path :: DevicePathProtocol ,
177
177
recursive : bool ,
178
178
) -> Status ,
179
179
disconnect_controller : unsafe extern "efiapi" fn (
@@ -927,11 +927,12 @@ impl BootServices {
927
927
device_path : & mut & DevicePath ,
928
928
) -> Result < Handle > {
929
929
let mut handle = None ;
930
- let mut device_path_ptr = device_path. as_ffi_ptr ( ) ;
930
+ let mut device_path_ptr: * const uefi_raw:: protocol:: device_path:: DevicePathProtocol =
931
+ device_path. as_ffi_ptr ( ) . cast ( ) ;
931
932
unsafe {
932
933
( self . 0 . locate_device_path ) ( & P :: GUID , & mut device_path_ptr, & mut handle)
933
934
. to_result_with_val ( || {
934
- * device_path = DevicePath :: from_ffi_ptr ( device_path_ptr) ;
935
+ * device_path = DevicePath :: from_ffi_ptr ( device_path_ptr. cast ( ) ) ;
935
936
// OK to unwrap: handle is non-null for Status::SUCCESS.
936
937
handle. unwrap ( )
937
938
} )
@@ -1051,7 +1052,7 @@ impl BootServices {
1051
1052
( self . 0 . load_image ) (
1052
1053
boot_policy,
1053
1054
parent_image_handle,
1054
- device_path,
1055
+ device_path. cast ( ) ,
1055
1056
source_buffer,
1056
1057
source_size,
1057
1058
& mut image_handle,
@@ -1255,7 +1256,8 @@ impl BootServices {
1255
1256
driver_image,
1256
1257
remaining_device_path
1257
1258
. map ( |dp| dp. as_ffi_ptr ( ) )
1258
- . unwrap_or ( ptr:: null ( ) ) ,
1259
+ . unwrap_or ( ptr:: null ( ) )
1260
+ . cast ( ) ,
1259
1261
recursive,
1260
1262
)
1261
1263
}
0 commit comments