@@ -5,13 +5,13 @@ use uefi::proto::device_path::text::*;
55use uefi:: proto:: device_path:: { DevicePath , LoadedImageDevicePath } ;
66use uefi:: proto:: loaded_image:: LoadedImage ;
77
8- pub fn test ( image : Handle , bt : & BootServices ) {
8+ pub fn test ( bt : & BootServices ) {
99 info ! ( "Running device path protocol test" ) ;
1010
1111 // test 1/2: test low-level API by directly opening all protocols
1212 {
1313 let loaded_image = bt
14- . open_protocol_exclusive :: < LoadedImage > ( image )
14+ . open_protocol_exclusive :: < LoadedImage > ( bt . image_handle ( ) )
1515 . expect ( "Failed to open LoadedImage protocol" ) ;
1616
1717 let device_path = bt
@@ -55,7 +55,7 @@ pub fn test(image: Handle, bt: &BootServices) {
5555 // Get the `LoadedImageDevicePath`. Verify it start with the same nodes as
5656 // `device_path`.
5757 let loaded_image_device_path = bt
58- . open_protocol_exclusive :: < LoadedImageDevicePath > ( image )
58+ . open_protocol_exclusive :: < LoadedImageDevicePath > ( bt . image_handle ( ) )
5959 . expect ( "Failed to open LoadedImageDevicePath protocol" ) ;
6060
6161 for ( n1, n2) in device_path
@@ -69,7 +69,7 @@ pub fn test(image: Handle, bt: &BootServices) {
6969 // test 2/2: test high-level to-string api
7070 {
7171 let loaded_image_device_path = bt
72- . open_protocol_exclusive :: < LoadedImageDevicePath > ( image )
72+ . open_protocol_exclusive :: < LoadedImageDevicePath > ( bt . image_handle ( ) )
7373 . expect ( "Failed to open LoadedImageDevicePath protocol" ) ;
7474 let device_path: & DevicePath = & loaded_image_device_path;
7575
0 commit comments