From 9d6865a75355be25cd1b3bbc5597d29d2862591c Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Mon, 3 Jun 2024 22:07:11 +0200 Subject: [PATCH] make volume_status_dirty public so it can be also used outside of tests --- src/fat/fat_table.rs | 1 - src/volume_mgr.rs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fat/fat_table.rs b/src/fat/fat_table.rs index 776cb2d..dc98f74 100644 --- a/src/fat/fat_table.rs +++ b/src/fat/fat_table.rs @@ -26,7 +26,6 @@ impl<'a> FatTable<'a> { const FAT16_DIRTY_BIT: u16 = 15; const FAT32_DIRTY_BIT: u32 = 27; - #[cfg(test)] pub(crate) fn dirty(&self) -> bool { match self.fat_type { FatType::Fat16 => { diff --git a/src/volume_mgr.rs b/src/volume_mgr.rs index 86e087c..bb43db0 100644 --- a/src/volume_mgr.rs +++ b/src/volume_mgr.rs @@ -394,8 +394,9 @@ where } Ok(()) } - #[cfg(test)] - fn volume_status_dirty(&self, volume: &FatVolume) -> Result> { + + /// Checking if the volume is dirty or was unmounted correctly in a previous usage + pub fn volume_status_dirty(&self, volume: &FatVolume) -> Result> { let mut blocks = [Block::new()]; let fat_table1_start = volume.lba_start + volume.fat_start; self.block_device