Skip to content

Commit

Permalink
Rafs: Add missing prefix of hex
Browse files Browse the repository at this point in the history
Without hex prefix, it confuses me a little bit when debugging flags problems.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
  • Loading branch information
liubogithub authored and jiangliu committed Jun 2, 2023
1 parent a88a2e8 commit 5b15922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rafs/src/metadata/md_v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl RafsSuper {
self.meta.sb_size = sb.sb_size();
self.meta.chunk_size = sb.block_size();
self.meta.flags = RafsSuperFlags::from_bits(sb.flags())
.ok_or_else(|| einval!(format!("invalid super flags {:x}", sb.flags())))?;
.ok_or_else(|| einval!(format!("invalid super flags 0x{:x}", sb.flags())))?;
info!("RAFS v5 super block features: {}", self.meta.flags);

self.meta.inodes_count = sb.inodes_count();
Expand Down
2 changes: 1 addition & 1 deletion rafs/src/metadata/md_v6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl RafsSuper {
self.meta.inodes_count = sb.inodes_count();

self.meta.flags = RafsSuperFlags::from_bits(ext_sb.flags())
.ok_or_else(|| einval!(format!("invalid RAFS flags {:x}", ext_sb.flags())))?;
.ok_or_else(|| einval!(format!("invalid RAFS flags 0x{:x}", ext_sb.flags())))?;
info!("RAFS features: {}", self.meta.flags);

self.meta.prefetch_table_entries = ext_sb.prefetch_table_size() / size_of::<u32>() as u32;
Expand Down

0 comments on commit 5b15922

Please sign in to comment.