Skip to content

Commit 85d6efd

Browse files
committed
uefi-test-runner: use new uefi::helpers module
Note that even without these changes, everything works. This proves that we stay API compatible for the next uefi-services release.
1 parent c921207 commit 85d6efd

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

uefi-test-runner/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ publish = false
66
edition = "2021"
77

88
[dependencies]
9-
uefi = { path = "../uefi", features = ["alloc"] }
10-
uefi-services = { path = "../uefi-services" }
9+
uefi = { path = "../uefi", features = ["alloc", "global_allocator", "panic_handler", "logger"] }
1110

1211
log.workspace = true
1312

uefi-test-runner/examples/hello_world.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use uefi::prelude::*;
1414
fn main(_image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
1515
// ANCHOR_END: entry
1616
// ANCHOR: services
17-
uefi_services::init(&mut system_table).unwrap();
17+
uefi::helpers::init(&mut system_table).unwrap();
1818
// ANCHOR_END: services
1919
// ANCHOR: log
2020
info!("Hello world!");

uefi-test-runner/examples/loaded_image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use uefi::{Identify, Result};
1414
// ANCHOR: main
1515
#[entry]
1616
fn main(image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
17-
uefi_services::init(&mut system_table).unwrap();
17+
uefi::helpers::init(&mut system_table).unwrap();
1818
let boot_services = system_table.boot_services();
1919

2020
print_image_path(boot_services).unwrap();

uefi-test-runner/examples/shell_params.rs

Lines changed: 2 additions & 2 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;
1011
use uefi::proto::shell_params::ShellParameters;
11-
use uefi_services::println;
1212

1313
extern crate alloc;
1414
use alloc::string::{String, ToString};
@@ -20,7 +20,7 @@ use alloc::vec::Vec;
2020
fn main(image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
2121
// ANCHOR_END: entry
2222
// ANCHOR: services
23-
uefi_services::init(&mut system_table).unwrap();
23+
uefi::helpers::init(&mut system_table).unwrap();
2424
let boot_services = system_table.boot_services();
2525
// ANCHOR_END: services
2626

uefi-test-runner/examples/sierpinski.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn draw_sierpinski(bt: &BootServices) -> Result {
125125

126126
#[entry]
127127
fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
128-
uefi_services::init(&mut system_table).unwrap();
128+
uefi::helpers::init(&mut system_table).unwrap();
129129
let bt = system_table.boot_services();
130130
draw_sierpinski(bt).unwrap();
131131
Status::SUCCESS

uefi-test-runner/src/bin/shell_launcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn get_shell_app_device_path<'a>(
4646

4747
#[entry]
4848
fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
49-
uefi_services::init(&mut st).unwrap();
49+
uefi::helpers::init(&mut st).unwrap();
5050
let boot_services = st.boot_services();
5151

5252
let mut storage = Vec::new();

uefi-test-runner/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use uefi::proto::device_path::build::{self, DevicePathBuilder};
1414
use uefi::proto::device_path::messaging::Vendor;
1515
use uefi::table::boot::MemoryType;
1616
use uefi::Result;
17-
use uefi_services::{print, println};
17+
use uefi::{print, println};
1818

1919
mod boot;
2020
mod fs;
@@ -24,7 +24,7 @@ mod runtime;
2424
#[entry]
2525
fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
2626
// Initialize utilities (logging, memory allocation...)
27-
uefi_services::init(&mut st).expect("Failed to initialize utilities");
27+
uefi::helpers::init(&mut st).expect("Failed to initialize utilities");
2828

2929
// unit tests here
3030

0 commit comments

Comments
 (0)