Revert "ksud: determine modules's size by checking partion size"

This reverts commit c40bfd694c.
This commit is contained in:
rifsxd
2025-03-23 22:38:01 +06:00
parent 9fc1bd1876
commit 30835787c9
3 changed files with 1 additions and 14 deletions

View File

@@ -598,16 +598,6 @@ dependencies = [
"miniz_oxide",
]
[[package]]
name = "fs4"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be058769cf1633370c3d0dac6bb9b223b8f18900cf808abadf7843192e706238"
dependencies = [
"rustix 0.38.44",
"windows-sys 0.59.0",
]
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -816,7 +806,6 @@ dependencies = [
"encoding_rs",
"env_logger",
"extattr",
"fs4",
"getopts",
"hole-punch",
"humansize",

View File

@@ -41,7 +41,6 @@ tempfile = "3"
chrono = "0.4"
hole-punch = { git = "https://github.com/tiann/hole-punch" }
regex-lite = "0.1"
fs4 = "0.13"
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
rustix = { git = "https://github.com/Kernel-SU/rustix.git", branch = "main", features = [

View File

@@ -376,8 +376,7 @@ fn _install_module(zip: &str) -> Result<()> {
humansize::format_size(zip_uncompressed_size, humansize::DECIMAL)
);
let data_vfs = fs4::statvfs("/data").with_context(|| "Failed to stat /data".to_string())?;
let sparse_image_size = data_vfs.total_space();
let sparse_image_size = 6 << 30; // 6GB
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