@@ -1590,7 +1590,6 @@ fn require_empty_rootdir(rootfs_fd: &Dir) -> Result<()> {
1590
1590
/// Remove all entries in a directory, but do not traverse across distinct devices.
1591
1591
/// If mount_err is true, then an error is returned if a mount point is found;
1592
1592
/// otherwise it is silently ignored.
1593
- #[ context( "Removing entries (noxdev)" ) ]
1594
1593
fn remove_all_in_dir_no_xdev ( d : & Dir , mount_err : bool ) -> Result < ( ) > {
1595
1594
for entry in d. entries ( ) ? {
1596
1595
let entry = entry?;
@@ -1623,15 +1622,16 @@ fn clean_boot_directories(rootfs: &Dir, is_ostree: bool) -> Result<()> {
1623
1622
. context ( "removing bootupd-state.json" ) ?;
1624
1623
} else {
1625
1624
// This should not remove /boot/efi note.
1626
- remove_all_in_dir_no_xdev ( & bootdir, false ) ?;
1625
+ remove_all_in_dir_no_xdev ( & bootdir, false ) . context ( "Emptying /boot" ) ?;
1627
1626
// TODO: Discover the ESP the same way bootupd does it; we should also
1628
1627
// support not wiping the ESP.
1629
1628
if ARCH_USES_EFI {
1630
1629
if let Some ( efidir) = bootdir
1631
1630
. open_dir_optional ( crate :: bootloader:: EFI_DIR )
1632
1631
. context ( "Opening /boot/efi" ) ?
1633
1632
{
1634
- remove_all_in_dir_no_xdev ( & efidir, false ) ?;
1633
+ remove_all_in_dir_no_xdev ( & efidir, false )
1634
+ . context ( "Emptying EFI system partition" ) ?;
1635
1635
}
1636
1636
}
1637
1637
}
0 commit comments