@@ -5,13 +5,13 @@ use uefi::proto::device_path::text::*;
5
5
use uefi:: proto:: device_path:: { DevicePath , LoadedImageDevicePath } ;
6
6
use uefi:: proto:: loaded_image:: LoadedImage ;
7
7
8
- pub fn test ( image : Handle , bt : & BootServices ) {
8
+ pub fn test ( bt : & BootServices ) {
9
9
info ! ( "Running device path protocol test" ) ;
10
10
11
11
// test 1/2: test low-level API by directly opening all protocols
12
12
{
13
13
let loaded_image = bt
14
- . open_protocol_exclusive :: < LoadedImage > ( image )
14
+ . open_protocol_exclusive :: < LoadedImage > ( bt . image_handle ( ) )
15
15
. expect ( "Failed to open LoadedImage protocol" ) ;
16
16
17
17
let device_path = bt
@@ -55,7 +55,7 @@ pub fn test(image: Handle, bt: &BootServices) {
55
55
// Get the `LoadedImageDevicePath`. Verify it start with the same nodes as
56
56
// `device_path`.
57
57
let loaded_image_device_path = bt
58
- . open_protocol_exclusive :: < LoadedImageDevicePath > ( image )
58
+ . open_protocol_exclusive :: < LoadedImageDevicePath > ( bt . image_handle ( ) )
59
59
. expect ( "Failed to open LoadedImageDevicePath protocol" ) ;
60
60
61
61
for ( n1, n2) in device_path
@@ -69,7 +69,7 @@ pub fn test(image: Handle, bt: &BootServices) {
69
69
// test 2/2: test high-level to-string api
70
70
{
71
71
let loaded_image_device_path = bt
72
- . open_protocol_exclusive :: < LoadedImageDevicePath > ( image )
72
+ . open_protocol_exclusive :: < LoadedImageDevicePath > ( bt . image_handle ( ) )
73
73
. expect ( "Failed to open LoadedImageDevicePath protocol" ) ;
74
74
let device_path: & DevicePath = & loaded_image_device_path;
75
75
0 commit comments