ksud: determine modules's size by checking partion size
This commit is contained in:
@@ -375,7 +375,8 @@ fn _install_module(zip: &str) -> Result<()> {
|
||||
humansize::format_size(zip_uncompressed_size, humansize::DECIMAL)
|
||||
);
|
||||
|
||||
let sparse_image_size = 1 << 40; // 1T
|
||||
let data_vfs = fs4::statvfs("/data").with_context(|| "Failed to stat /data".to_string())?;
|
||||
let sparse_image_size = data_vfs.total_space();
|
||||
if !modules_img_exist && !modules_update_img_exist {
|
||||
// if no modules and modules_update, it is brand new installation, we should create a new img
|
||||
// create a tmp module img and mount it to modules_update
|
||||
|
||||
Reference in New Issue
Block a user