diff --git a/fat-fuse/src/fuse.rs b/fat-fuse/src/fuse.rs index 6a77fb4..adb0cb5 100644 --- a/fat-fuse/src/fuse.rs +++ b/fat-fuse/src/fuse.rs @@ -20,7 +20,18 @@ impl Filesystem for FatFuse { Ok(()) } - fn destroy(&mut self) {} + fn destroy(&mut self) { + debug!("inode_table: {}", self.inode_table.len()); + + debug!("ino_by_first_cluster: {}", self.ino_by_first_cluster.len()); + for (&first_cluster, &ino) in self.ino_by_first_cluster.iter() { + debug!("{} -> {}", first_cluster, ino); + } + + debug!("ino_by_fh: {}", self.ino_by_fh.len()); + + debug!("ino_by_path: {}", self.ino_by_path.len()); + } fn lookup( &mut self, diff --git a/fat-fuse/src/lib.rs b/fat-fuse/src/lib.rs index 0605514..5291746 100644 --- a/fat-fuse/src/lib.rs +++ b/fat-fuse/src/lib.rs @@ -28,21 +28,6 @@ pub struct FatFuse { ino_by_path: FxHashMap, u64>, } -impl Drop for FatFuse { - fn drop(&mut self) { - println!("inode_table: {}", self.inode_table.len()); - - println!("ino_by_first_cluster: {}", self.ino_by_first_cluster.len()); - for (&first_cluster, &ino) in self.ino_by_first_cluster.iter() { - println!("{} -> {}", first_cluster, ino); - } - - println!("ino_by_fh: {}", self.ino_by_fh.len()); - - println!("ino_by_path: {}", self.ino_by_path.len()); - } -} - /// SAFETY /// /// do NOT leak Rc from this type diff --git a/fat-mount/src/main.rs b/fat-mount/src/main.rs index e75213c..c63f238 100644 --- a/fat-mount/src/main.rs +++ b/fat-mount/src/main.rs @@ -34,7 +34,5 @@ fn main() -> anyhow::Result<()> { rx.recv().unwrap(); - println!("done"); - Ok(()) }