diff --git a/src/efi.rs b/src/efi.rs index 81089f4b..3cc44ae5 100644 --- a/src/efi.rs +++ b/src/efi.rs @@ -454,15 +454,17 @@ pub(crate) fn clear_efi_current() -> Result<()> { log::debug!("No EFI {BOOTCURRENT} found"); return Ok(()); }; + log::debug!("EFI current: {current}"); let output = Command::new(EFIBOOTMGR) .args(["-b", current, "-B"]) .output()?; - if !output.status.success() { + let st = output.status; + if !st.success() { std::io::copy( &mut std::io::Cursor::new(output.stderr), &mut std::io::stderr().lock(), )?; - anyhow::bail!("Failed to invoke {EFIBOOTMGR}"); + anyhow::bail!("Failed to invoke {EFIBOOTMGR}: {st:?}"); } anyhow::Ok(()) } diff --git a/src/filesystem.rs b/src/filesystem.rs index f09ceb34..c9060a70 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -1,3 +1,4 @@ +use std::io::Write; use std::os::fd::AsRawFd; use std::os::unix::process::CommandExt; use std::process::Command; @@ -27,12 +28,13 @@ pub(crate) fn inspect_filesystem(root: &openat::Dir, path: &str) -> Result