We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 645ecb8 commit 85b96b3Copy full SHA for 85b96b3
uefi-test-runner/src/proto/media/mod.rs
@@ -27,8 +27,18 @@ fn test_file_system_info(directory: &mut Directory) {
27
pub fn test(image: Handle, bt: &BootServices) {
28
info!("Testing Media Access protocols");
29
30
- if let Ok(sfs) = bt.locate_protocol::<SimpleFileSystem>() {
31
- let sfs = unsafe { &mut *sfs.get() };
+ if let Ok(handle) = bt.get_handle_for_protocol::<SimpleFileSystem>() {
+ 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
+
42
let mut directory = sfs.open_volume().unwrap();
43
let mut buffer = vec![0; 128];
44
loop {
0 commit comments