Skip to content

Commit ae72878

Browse files
authored
Merge pull request #151 from rust-embedded-community/better-trace-logs
Better trace logs.
2 parents d33233d + c12c7ee commit ae72878

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/fat/volume.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl FatVolume {
221221
let fat_offset = cluster.0 * 2;
222222
this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
223223
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
224-
trace!("Reading FAT");
224+
trace!("Reading FAT for update");
225225
block_device
226226
.read(&mut blocks, this_fat_block_num)
227227
.map_err(Error::DeviceError)?;
@@ -243,7 +243,7 @@ impl FatVolume {
243243
let fat_offset = cluster.0 * 4;
244244
this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
245245
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
246-
trace!("Reading FAT");
246+
trace!("Reading FAT for update");
247247
block_device
248248
.read(&mut blocks, this_fat_block_num)
249249
.map_err(Error::DeviceError)?;
@@ -263,7 +263,7 @@ impl FatVolume {
263263
);
264264
}
265265
}
266-
trace!("Writing FAT");
266+
trace!("Updating FAT");
267267
block_device
268268
.write(&blocks, this_fat_block_num)
269269
.map_err(Error::DeviceError)?;
@@ -288,7 +288,7 @@ impl FatVolume {
288288
let fat_offset = cluster.0 * 2;
289289
let this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
290290
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
291-
trace!("Reading FAT");
291+
trace!("Walkng FAT");
292292
let block = fat_block_cache.read(block_device, this_fat_block_num)?;
293293
let fat_entry =
294294
LittleEndian::read_u16(&block[this_fat_ent_offset..=this_fat_ent_offset + 1]);
@@ -311,7 +311,7 @@ impl FatVolume {
311311
let fat_offset = cluster.0 * 4;
312312
let this_fat_block_num = self.lba_start + self.fat_start.offset_bytes(fat_offset);
313313
let this_fat_ent_offset = (fat_offset % Block::LEN_U32) as usize;
314-
trace!("Reading FAT");
314+
trace!("Walking FAT");
315315
let block = fat_block_cache.read(block_device, this_fat_block_num)?;
316316
let fat_entry =
317317
LittleEndian::read_u32(&block[this_fat_ent_offset..=this_fat_ent_offset + 3])
@@ -586,7 +586,7 @@ impl FatVolume {
586586
let mut block_cache = BlockCache::empty();
587587
while let Some(cluster) = current_cluster {
588588
for block_idx in first_dir_block_num.range(dir_size) {
589-
trace!("Reading FAT");
589+
trace!("Reading directory");
590590
let block = block_cache.read(block_device, block_idx)?;
591591
for (i, dir_entry_bytes) in block.chunks_exact(OnDiskDirEntry::LEN).enumerate() {
592592
let dir_entry = OnDiskDirEntry::new(dir_entry_bytes);
@@ -638,7 +638,7 @@ impl FatVolume {
638638
while let Some(cluster) = current_cluster {
639639
let block_idx = self.cluster_to_block(cluster);
640640
for block in block_idx.range(BlockCount(u32::from(self.blocks_per_cluster))) {
641-
trace!("Reading FAT");
641+
trace!("Reading directory");
642642
block_device
643643
.read(&mut blocks, block)
644644
.map_err(Error::DeviceError)?;

0 commit comments

Comments
 (0)