Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better trace logs. #151

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/fat/volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl FatVolume {
let fat_offset = cluster.0 * 2;
this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
trace!("Reading FAT");
trace!("Reading FAT for update");
block_device
.read(&mut blocks, this_fat_block_num)
.map_err(Error::DeviceError)?;
Expand All @@ -243,7 +243,7 @@ impl FatVolume {
let fat_offset = cluster.0 * 4;
this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
trace!("Reading FAT");
trace!("Reading FAT for update");
block_device
.read(&mut blocks, this_fat_block_num)
.map_err(Error::DeviceError)?;
Expand All @@ -263,7 +263,7 @@ impl FatVolume {
);
}
}
trace!("Writing FAT");
trace!("Updating FAT");
block_device
.write(&blocks, this_fat_block_num)
.map_err(Error::DeviceError)?;
Expand All @@ -288,7 +288,7 @@ impl FatVolume {
let fat_offset = cluster.0 * 2;
let this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
trace!("Reading FAT");
trace!("Walkng FAT");
let block = fat_block_cache.read(block_device, this_fat_block_num)?;
let fat_entry =
LittleEndian::read_u16(&block[this_fat_ent_offset..=this_fat_ent_offset + 1]);
Expand All @@ -311,7 +311,7 @@ impl FatVolume {
let fat_offset = cluster.0 * 4;
let this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
trace!("Reading FAT");
trace!("Walking FAT");
let block = fat_block_cache.read(block_device, this_fat_block_num)?;
let fat_entry =
LittleEndian::read_u32(&block[this_fat_ent_offset..=this_fat_ent_offset + 3])
Expand Down Expand Up @@ -586,7 +586,7 @@ impl FatVolume {
let mut block_cache = BlockCache::empty();
while let Some(cluster) = current_cluster {
for block_idx in first_dir_block_num.range(dir_size) {
trace!("Reading FAT");
trace!("Reading directory");
let block = block_cache.read(block_device, block_idx)?;
for (i, dir_entry_bytes) in block.chunks_exact(OnDiskDirEntry::LEN).enumerate() {
let dir_entry = OnDiskDirEntry::new(dir_entry_bytes);
Expand Down Expand Up @@ -638,7 +638,7 @@ impl FatVolume {
while let Some(cluster) = current_cluster {
let block_idx = self.cluster_to_block(cluster);
for block in block_idx.range(BlockCount(u32::from(self.blocks_per_cluster))) {
trace!("Reading FAT");
trace!("Reading directory");
block_device
.read(&mut blocks, block)
.map_err(Error::DeviceError)?;
Expand Down