Skip to content

Commit da0597e

Browse files
test-runner: Fix accidental use of generated entry args
1 parent f529325 commit da0597e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

uefi-test-runner/examples/hello_world.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
// ANCHOR: use
88
use log::info;
9+
use uefi::boot;
910
use uefi::prelude::*;
1011
// ANCHOR_END: use
1112

@@ -18,7 +19,7 @@ fn main() -> Status {
1819
// ANCHOR_END: services
1920
// ANCHOR: log
2021
info!("Hello world!");
21-
system_table.boot_services().stall(10_000_000);
22+
boot::stall(10_000_000);
2223
// ANCHOR_END: log
2324
// ANCHOR: return
2425
Status::SUCCESS

uefi-test-runner/examples/shell_params.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use log::error;
88
// ANCHOR: use
99
use uefi::prelude::*;
10-
use uefi::println;
1110
use uefi::proto::shell_params::ShellParameters;
11+
use uefi::{boot, println};
1212

1313
extern crate alloc;
1414
use alloc::string::{String, ToString};
@@ -21,12 +21,11 @@ fn main() -> Status {
2121
// ANCHOR_END: entry
2222
// ANCHOR: services
2323
uefi::helpers::init().unwrap();
24-
let boot_services = system_table.boot_services();
2524
// ANCHOR_END: services
2625

2726
// ANCHOR: params
2827
let shell_params =
29-
boot_services.open_protocol_exclusive::<ShellParameters>(image_handle);
28+
boot::open_protocol_exclusive::<ShellParameters>(boot::image_handle());
3029
let shell_params = match shell_params {
3130
Ok(s) => s,
3231
Err(e) => {

0 commit comments

Comments
 (0)