ksud: e2fsck before resize2fs

This commit is contained in:
tiann
2023-02-09 13:53:07 +08:00
parent 473f02396f
commit 626642af76

View File

@@ -87,6 +87,9 @@ fn mark_module_state(module: &str, flag_file: &str, create_or_delete: bool) -> R
} }
fn get_minimal_image_size(img: &str) -> Result<u64> { fn get_minimal_image_size(img: &str) -> Result<u64> {
check_image(img)?;
let output = Command::new("resize2fs") let output = Command::new("resize2fs")
.args(["-P", img]) .args(["-P", img])
.stdout(Stdio::piped()) .stdout(Stdio::piped())