File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
uefi-test-runner/src/proto/media Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,18 @@ fn test_file_system_info(directory: &mut Directory) {
27
27
pub fn test ( image : Handle , bt : & BootServices ) {
28
28
info ! ( "Testing Media Access protocols" ) ;
29
29
30
- if let Ok ( sfs) = bt. locate_protocol :: < SimpleFileSystem > ( ) {
31
- let sfs = unsafe { & mut * sfs. get ( ) } ;
30
+ if let Ok ( handle) = bt. get_handle_for_protocol :: < SimpleFileSystem > ( ) {
31
+ let mut sfs = bt
32
+ . open_protocol :: < SimpleFileSystem > (
33
+ OpenProtocolParams {
34
+ handle,
35
+ agent : image,
36
+ controller : None ,
37
+ } ,
38
+ OpenProtocolAttributes :: Exclusive ,
39
+ )
40
+ . expect ( "failed to open SimpleFileSystem protocol" ) ;
41
+
32
42
let mut directory = sfs. open_volume ( ) . unwrap ( ) ;
33
43
let mut buffer = vec ! [ 0 ; 128 ] ;
34
44
loop {
You can’t perform that action at this time.
0 commit comments