ksud: Add some logs
This commit is contained in:
@@ -391,16 +391,13 @@ fn _install_module(zip: &str) -> Result<()> {
|
|||||||
println!("- Legacy image, migrating to new format, please be patient...");
|
println!("- Legacy image, migrating to new format, please be patient...");
|
||||||
create_module_image(tmp_module_img, sparse_image_size, journal_size)?;
|
create_module_image(tmp_module_img, sparse_image_size, journal_size)?;
|
||||||
let _dontdrop =
|
let _dontdrop =
|
||||||
mount::AutoMountExt4::try_new(tmp_module_img, module_update_tmp_dir, true)?;
|
mount::AutoMountExt4::try_new(tmp_module_img, module_update_tmp_dir, true)
|
||||||
utils::copy_module_files(defs::MODULE_DIR, module_update_tmp_dir)?;
|
.with_context(|| format!("Failed to mount {tmp_module_img}"))?;
|
||||||
|
utils::copy_module_files(defs::MODULE_DIR, module_update_tmp_dir)
|
||||||
|
.with_context(|| "Failed to migrate module files".to_string())?;
|
||||||
} else {
|
} else {
|
||||||
utils::copy_sparse_file(modules_img, tmp_module_img, true).with_context(|| {
|
utils::copy_sparse_file(modules_img, tmp_module_img, true)
|
||||||
format!(
|
.with_context(|| "Failed to copy module image".to_string())?;
|
||||||
"Failed to copy {} to {}",
|
|
||||||
modules_img.display(),
|
|
||||||
tmp_module_img
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -260,8 +260,11 @@ fn copy_xattrs(src_path: impl AsRef<Path>, dest_path: impl AsRef<Path>) -> Resul
|
|||||||
xattr.to_string_lossy(),
|
xattr.to_string_lossy(),
|
||||||
value.to_string_lossy(),
|
value.to_string_lossy(),
|
||||||
);
|
);
|
||||||
|
if let Err(e) =
|
||||||
extattr::lsetxattr(dest_path.as_ref(), &xattr, &value, extattr::Flags::empty())
|
extattr::lsetxattr(dest_path.as_ref(), &xattr, &value, extattr::Flags::empty())
|
||||||
.with_context(|| format!("Failed to set xattr for {:?}", dest_path.as_ref()))?;
|
{
|
||||||
|
log::warn!("Failed to set xattr: {}", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user