ksud: reclaim sparse space when install/uninstall modules. close #1367

This commit is contained in:
weishu
2024-02-19 15:27:27 +08:00
parent e0802b0d15
commit e0e7058d14
3 changed files with 101 additions and 0 deletions

View File

@@ -119,6 +119,13 @@ enum Debug {
/// destination file
dst: String,
},
/// Punch hole file
PunchHole {
/// file path
file: String,
},
/// For testing
Test,
}
@@ -292,6 +299,7 @@ pub fn run() -> Result<()> {
utils::copy_sparse_file(src, dst)?;
Ok(())
}
Debug::PunchHole { file } => utils::punch_hole(file),
Debug::Test => todo!(),
},