From 2992cf06fd5db7bc1b848a27e09c4a7864dcb995 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Fri, 9 Aug 2024 17:05:07 +0200 Subject: [PATCH 1/2] mem: simplify debugging with more logging This is a case that we should log. Otherwise, people may misleadingly think that an UEFI interface reported Status::UNSUPPORTED, although this comes from the high-level wrapper. --- uefi/src/mem/util.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uefi/src/mem/util.rs b/uefi/src/mem/util.rs index 1d0d66d41..6df38d916 100644 --- a/uefi/src/mem/util.rs +++ b/uefi/src/mem/util.rs @@ -54,7 +54,10 @@ pub(crate) fn make_boxed< // Propagate any other error. Err((status, _)) => Err(Error::from(status)), // Success is unexpected, return an error. - Ok(_) => Err(Error::from(Status::UNSUPPORTED)), + Ok(_) => { + log::debug!("Got unexpected success status"); + Err(Error::from(Status::UNSUPPORTED)) + } }?; // We add trailing padding because the size of a rust structure must From 94b4bfea7e65714e91abcc8548e1865770b91096 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Sun, 11 Aug 2024 12:56:56 +0200 Subject: [PATCH 2/2] typo --- uefi/src/table/boot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uefi/src/table/boot.rs b/uefi/src/table/boot.rs index 46a79cd7a..ed35ae922 100644 --- a/uefi/src/table/boot.rs +++ b/uefi/src/table/boot.rs @@ -1387,7 +1387,7 @@ impl super::Table for BootServices { /// image source. #[derive(Debug)] pub enum LoadImageSource<'a> { - /// Load an image from a buffer. The data will copied from the + /// Load an image from a buffer. The data will be copied from the /// buffer, so the input reference doesn't need to remain valid /// after the image is loaded. FromBuffer {