mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-08-26 18:26:05 -04:00
Transform feature "ignore-logger-errors" to additive feature.
This commit is contained in:
parent
9047806861
commit
1863e29405
3 changed files with 11 additions and 8 deletions
|
|
@ -22,6 +22,8 @@
|
|||
- Deprecated `BootServices::locate_protocol` and marked it `unsafe`. Use
|
||||
`BootServices::get_handle_for_protocol` and
|
||||
`BootServices::open_protocol` instead.
|
||||
- renamed feature `ignore-logger-errors` to `panic-on-logger-errors` so that it is
|
||||
additive. It is now a default feature.
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
@ -39,7 +41,7 @@
|
|||
|
||||
- The `no_panic_handler` feature has been replaced with an additive
|
||||
`panic_handler` feature. The new feature is enabled by default.
|
||||
|
||||
|
||||
## uefi - 0.16.1
|
||||
|
||||
### Added
|
||||
|
|
@ -55,7 +57,7 @@
|
|||
function pointers. This prevents potential invalid pointer access.
|
||||
- Fixed an incorrect pointer cast in the `Rng` protocol that could cause
|
||||
undefined behavior.
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- Relaxed the version requirements for the `bitflags` and `log`
|
||||
|
|
|
|||
|
|
@ -19,13 +19,14 @@ categories = ["embedded", "no-std", "api-bindings"]
|
|||
license = "MPL-2.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["panic-on-logger-errors"]
|
||||
alloc = []
|
||||
exts = []
|
||||
logger = []
|
||||
# Ignore text output errors in logger as a workaround for firmware issues that
|
||||
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121)
|
||||
ignore-logger-errors = []
|
||||
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121).
|
||||
# In those cases, this feature can be excluded by removing the default features.
|
||||
panic-on-logger-errors = []
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1.3.1"
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ impl log::Log for Logger {
|
|||
// Ignoring errors is bad, especially when they represent loss of
|
||||
// precious early-boot system diagnosis data, so we panic by
|
||||
// default. But if you experience this problem and want your UEFI
|
||||
// application to keep running when it happens, you can enable the
|
||||
// `ignore-logger-error` cargo feature. If you do so, logging errors
|
||||
// application to keep running when it happens, you can disable the
|
||||
// `panic-on-logger-errors` cargo feature. If you do so, logging errors
|
||||
// will be ignored by `uefi-rs` instead.
|
||||
//
|
||||
if !cfg!(feature = "ignore-logger-errors") {
|
||||
if cfg!(feature = "panic-on-logger-errors") {
|
||||
result.unwrap()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue