ksud: don't reclaim when enable/disable modules

This commit is contained in:
weishu
2024-02-19 16:36:41 +08:00
parent e0e7058d14
commit cfc982f2f3
3 changed files with 24 additions and 6 deletions

View File

@@ -232,6 +232,7 @@ pub fn copy_sparse_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> Resul
Ok(())
}
#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn punch_hole(src: impl AsRef<Path>) -> Result<()> {
let mut src_file = OpenOptions::new().write(true).read(true).open(src)?;
@@ -316,3 +317,8 @@ pub fn punch_hole(src: impl AsRef<Path>) -> Result<()> {
Ok(())
}
#[cfg(not(any(target_os = "linux", target_os = "android")))]
pub fn punch_hole(src: impl AsRef<Path>) -> Result<()> {
unimplemented!()
}