Skip to content

Commit

Permalink
Merge pull request #1350 from nicholasbishop/bishop-rename-entry-args
Browse files Browse the repository at this point in the history
uefi-macros: Rename generated entry arguments
  • Loading branch information
phip1611 authored Aug 25, 2024
2 parents 7bd40b9 + c135e6c commit 26d3b74
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions uefi-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
if f.sig.inputs.is_empty() {
f.sig.inputs = parse_quote_spanned!(
signature_span=>
image_handle: ::uefi::Handle,
system_table: ::uefi::table::SystemTable<::uefi::table::Boot>
internal_image_handle: ::uefi::Handle,
internal_system_table: ::uefi::table::SystemTable<::uefi::table::Boot>
);
}

Expand Down
3 changes: 2 additions & 1 deletion uefi-test-runner/examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// ANCHOR: use
use log::info;
use uefi::boot;
use uefi::prelude::*;
// ANCHOR_END: use

Expand All @@ -18,7 +19,7 @@ fn main() -> Status {
// ANCHOR_END: services
// ANCHOR: log
info!("Hello world!");
system_table.boot_services().stall(10_000_000);
boot::stall(10_000_000);
// ANCHOR_END: log
// ANCHOR: return
Status::SUCCESS
Expand Down
5 changes: 2 additions & 3 deletions uefi-test-runner/examples/shell_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use log::error;
// ANCHOR: use
use uefi::prelude::*;
use uefi::println;
use uefi::proto::shell_params::ShellParameters;
use uefi::{boot, println};

extern crate alloc;
use alloc::string::{String, ToString};
Expand All @@ -21,12 +21,11 @@ fn main() -> Status {
// ANCHOR_END: entry
// ANCHOR: services
uefi::helpers::init().unwrap();
let boot_services = system_table.boot_services();
// ANCHOR_END: services

// ANCHOR: params
let shell_params =
boot_services.open_protocol_exclusive::<ShellParameters>(image_handle);
boot::open_protocol_exclusive::<ShellParameters>(boot::image_handle());
let shell_params = match shell_params {
Ok(s) => s,
Err(e) => {
Expand Down

0 comments on commit 26d3b74

Please sign in to comment.