Skip to content

Commit 2f0fdad

Browse files
committed
Transform feature "ignore-logger-errors" to additive feature.
1 parent f93f089 commit 2f0fdad

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- Implemented `core::fmt::Write` for the `Serial` protocol.
1212
- Added the `MemoryProtection` protocol.
1313
- Added `BootServices::get_handle_for_protocol`.
14+
- **Breaking**: renamed feature `ignore-logger-errors` to `panic-on-logger-errors` so that it is
15+
additive. It is now a default feature.
1416

1517
### Changed
1618

@@ -27,7 +29,7 @@
2729
version to make sure it's 2.0 or higher before calling the associated
2830
function pointers. This prevents potential invalid pointer access.
2931
- The table `Header` struct's `Debug` impl now prints the correct signature.
30-
32+
3133
### Removed
3234

3335
- Removed the `exts::allocate_buffer` function. This function could

Cargo.toml

+4-3
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.2"

src/logger.rs

+3-3
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 disalbe 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)