Skip to content

Commit 41a3cb4

Browse files
authored
Merge pull request #1379 from rust-osdev/bishop-deprecate-system
uefi: Deprecate SystemTable
2 parents 781c608 + 13e8b34 commit 41a3cb4

15 files changed

+28
-11
lines changed

uefi-macros/tests/ui/fail/entry_bad_abi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused_imports)]
22
#![no_main]
3+
#![allow(deprecated)]
34

45
use uefi::prelude::*;
56
use uefi_macros::entry;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Entry method must have no ABI modifier
2-
--> tests/ui/fail/entry_bad_abi.rs:8:1
2+
--> tests/ui/fail/entry_bad_abi.rs:9:1
33
|
4-
8 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
4+
9 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
55
| ^^^^^^

uefi-macros/tests/ui/fail/entry_bad_arg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused_imports)]
22
#![no_main]
3+
#![allow(deprecated)]
34

45
use uefi::prelude::*;
56
use uefi_macros::entry;

uefi-macros/tests/ui/fail/entry_bad_arg.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/fail/entry_bad_arg.rs:8:1
2+
--> tests/ui/fail/entry_bad_arg.rs:9:1
33
|
4-
8 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
4+
9 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> uefi::Status`

uefi-macros/tests/ui/fail/entry_bad_return_type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused_imports)]
22
#![no_main]
3+
#![allow(deprecated)]
34

45
use uefi::prelude::*;
56
use uefi_macros::entry;

uefi-macros/tests/ui/fail/entry_bad_return_type.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0308]: mismatched types
2-
--> tests/ui/fail/entry_bad_return_type.rs:8:1
2+
--> tests/ui/fail/entry_bad_return_type.rs:9:1
33
|
4-
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
4+
9 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> Status`

uefi-macros/tests/ui/pass/entry.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(deprecated)]
2+
13
use uefi::table::{Boot, SystemTable};
24
use uefi::{entry, Handle, Status};
35

uefi-macros/tests/ui/pass/entry_docstring.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(deprecated)]
2+
13
use uefi::table::{Boot, SystemTable};
24
use uefi::{entry, Handle, Status};
35

uefi-macros/tests/ui/pass/entry_unsafe.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(deprecated)]
2+
13
use uefi::table::{Boot, SystemTable};
24
use uefi::{entry, Handle, Status};
35

uefi/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ how to integrate the `uefi` crate into them.
1111
- Added `Handle::new`
1212

1313
## Changed
14-
- The `BootServices` and `RuntimeServices` structs have been deprecated. Use
15-
the `uefi::runtime` and `uefi::boot` modules instead.
14+
- The `BootServices`, `RuntimeServices`, and `SystemTable` structs have been
15+
deprecated. Use the `uefi::boot` and `uefi::runtime`, and `uefi::system`
16+
modules instead.
1617
- In `uefi::table::boot`, `ScopedProtocol`, `TplGuard`, `ProtocolsPerHandle`,
1718
and `HandleBuffer` have been deprecated. Use the structs of the same name in
1819
`uefi::boot` instead.

0 commit comments

Comments
 (0)