Tweaked dbg script headers to match the mount info log

The main difference being rendering the weight with a single letter "w"
prefix:

  $ ./scripts/dbglfs.py disk -b4096
  littlefs v0.0 4096x256 0x{1,0}.8b w2.512, rev eb7f2a0d
  ...

This lets us add valuable weight info without too much noise.

Adopting this in the dbg scripts is nice for consistency.
This commit is contained in:
Christopher Haster
2024-05-24 02:49:39 -05:00
parent 8a263fb6c5
commit 2e8012681b
4 changed files with 16 additions and 8 deletions

View File

@@ -1030,7 +1030,7 @@ def main(disk, blocks=None, *,
weights[i],
cksums[i])
print('rbyd %s, rev %08x, size %d, weight %d, cksum %08x' % (
print('rbyd %s w%d, rev %08x, size %d, cksum %08x' % (
'0x%x.%x' % (block, trunk_)
if len(blocks) == 1
else '0x{%x,%s}.%x' % (
@@ -1038,7 +1038,10 @@ def main(disk, blocks=None, *,
','.join('%x' % blocks[(i+1+j) % len(blocks)]
for j in range(len(blocks)-1)),
trunk_),
rev, eoff, weight, cksum))
weight,
rev,
eoff,
cksum))
if args.get('log'):
dbg_log(data, block_size, rev, eoff, weight,