Skip to content

Commit 2b868fb

Browse files
authored
Merge pull request #1378 from nicholasbishop/bishop-deprecate-table-helpers
uefi: Deprecate table::{system_table_boot,system_table_runtime}
2 parents 2b593fe + 682eaf5 commit 2b868fb

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

uefi/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ how to integrate the `uefi` crate into them.
1616
- In `uefi::table::boot`, `ScopedProtocol`, `TplGuard`, `ProtocolsPerHandle`,
1717
and `HandleBuffer` have been deprecated. Use the structs of the same name in
1818
`uefi::boot` instead.
19+
- `uefi::table::system_table_boot` and `uefi::table::system_table_runtime` have
20+
been deprecated. Use the `uefi::runtime` and `uefi::boot` modules instead.
1921
- **Breaking:** The conversion functions between device paths and text no longer
2022
take a `BootServices` argument. The global system table is used instead.
2123
- **Breaking:** `GraphicsOutput::modes` no longer takes a `BootServices`

uefi/src/helpers/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ mod println;
4242
#[must_use]
4343
#[deprecated(note = "use uefi::table::system_table_boot instead")]
4444
pub fn system_table() -> SystemTable<Boot> {
45+
#[allow(deprecated)]
4546
table::system_table_boot().expect("boot services are not active")
4647
}
4748

uefi/src/table/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub unsafe fn set_system_table(ptr: *const uefi_raw::table::system::SystemTable)
6060
}
6161

6262
/// Get the system table while boot services are active.
63+
#[deprecated = "Use the uefi::boot module instead. See https://github.com/rust-osdev/uefi-rs/blob/HEAD/docs/funcs_migration.md"]
6364
pub fn system_table_boot() -> Option<SystemTable<Boot>> {
6465
let st = SYSTEM_TABLE.load(Ordering::Acquire);
6566
if st.is_null() {
@@ -77,6 +78,7 @@ pub fn system_table_boot() -> Option<SystemTable<Boot>> {
7778
}
7879

7980
/// Get the system table while runtime services are active.
81+
#[deprecated = "Use the uefi::runtime module instead. See https://github.com/rust-osdev/uefi-rs/blob/HEAD/docs/funcs_migration.md"]
8082
pub fn system_table_runtime() -> Option<SystemTable<Runtime>> {
8183
let st = SYSTEM_TABLE.load(Ordering::Acquire);
8284
if st.is_null() {

0 commit comments

Comments
 (0)