Skip to content

Commit 480036e

Browse files
authored
Merge pull request #1365 from nicholasbishop/bishop-deprecate-runtime-svc
uefi: Deprecate RuntimeServices
2 parents b45a5e9 + c3415ad commit 480036e

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

uefi-test-runner/src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#![no_std]
22
#![no_main]
3+
// TODO: temporarily allow deprecated code so that we can continue to test
4+
// SystemTable/BootServices/RuntimeServices.
5+
#![allow(deprecated)]
36

47
#[macro_use]
58
extern crate log;

uefi/src/prelude.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ pub use crate::{cstr16, cstr8, entry, Handle, ResultExt, Status, StatusExt};
66

77
// Import the basic table types.
88
pub use crate::table::boot::BootServices;
9+
#[allow(deprecated)]
910
pub use crate::table::runtime::RuntimeServices;
1011
pub use crate::table::{Boot, SystemTable};

uefi/src/table/runtime.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! UEFI services available at runtime, even after the OS boots.
22
3+
#![allow(deprecated)]
4+
35
pub use crate::runtime::{
46
CapsuleInfo, Time, TimeByteConversionError, TimeError, TimeParams, VariableStorageInfo,
57
};
@@ -35,6 +37,7 @@ use {
3537
/// A reference to `RuntimeServices` can only be accessed by calling [`SystemTable::runtime_services`].
3638
///
3739
/// [`SystemTable::runtime_services`]: crate::table::SystemTable::runtime_services
40+
#[deprecated = "Use the uefi::runtime module instead. See https://github.com/rust-osdev/uefi-rs/blob/HEAD/docs/funcs_migration.md"]
3841
#[derive(Debug)]
3942
#[repr(C)]
4043
pub struct RuntimeServices(uefi_raw::table::runtime::RuntimeServices);

uefi/src/table/system.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(deprecated)]
2+
13
use super::boot::BootServices;
24
use super::runtime::{ResetType, RuntimeServices};
35
use super::{cfg, Revision};

0 commit comments

Comments
 (0)