Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1863e29

Browse files
phip1611nicholasbishop
authored andcommitted
Transform feature "ignore-logger-errors" to additive feature.
1 parent 9047806 commit 1863e29

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

‎CHANGELOG.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- Deprecated `BootServices::locate_protocol` and marked it `unsafe`. Use
2323
`BootServices::get_handle_for_protocol` and
2424
`BootServices::open_protocol` instead.
25+
- renamed feature `ignore-logger-errors` to `panic-on-logger-errors` so that it is
26+
additive. It is now a default feature.
2527

2628
### Removed
2729

@@ -39,7 +41,7 @@
3941

4042
- The `no_panic_handler` feature has been replaced with an additive
4143
`panic_handler` feature. The new feature is enabled by default.
42-
44+
4345
## uefi - 0.16.1
4446

4547
### Added
@@ -55,7 +57,7 @@
5557
function pointers. This prevents potential invalid pointer access.
5658
- Fixed an incorrect pointer cast in the `Rng` protocol that could cause
5759
undefined behavior.
58-
60+
5961
### Changed
6062

6163
- Relaxed the version requirements for the `bitflags` and `log`

‎Cargo.toml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ categories = ["embedded", "no-std", "api-bindings"]
1919
license = "MPL-2.0"
2020

2121
[features]
22-
default = []
22+
default = ["panic-on-logger-errors"]
2323
alloc = []
2424
exts = []
2525
logger = []
2626
# Ignore text output errors in logger as a workaround for firmware issues that
27-
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121)
28-
ignore-logger-errors = []
27+
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121).
28+
# In those cases, this feature can be excluded by removing the default features.
29+
panic-on-logger-errors = []
2930

3031
[dependencies]
3132
bitflags = "1.3.1"

‎src/logger.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ impl log::Log for Logger {
7373
// Ignoring errors is bad, especially when they represent loss of
7474
// precious early-boot system diagnosis data, so we panic by
7575
// default. But if you experience this problem and want your UEFI
76-
// application to keep running when it happens, you can enable the
77-
// `ignore-logger-error` cargo feature. If you do so, logging errors
76+
// application to keep running when it happens, you can disable the
77+
// `panic-on-logger-errors` cargo feature. If you do so, logging errors
7878
// will be ignored by `uefi-rs` instead.
7979
//
80-
if !cfg!(feature = "ignore-logger-errors") {
80+
if cfg!(feature = "panic-on-logger-errors") {
8181
result.unwrap()
8282
}
8383
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /