diff --git a/CHANGELOG.md b/CHANGELOG.md index 209715b32..5234d13a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/Cargo.toml b/Cargo.toml index 42addb023..18d780a14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/logger.rs b/src/logger.rs index 71273e171..5b073652d 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -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() } }