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
+4 -2
View File
@@ -1884,11 +1884,13 @@ def main(disk, mroots=None, *,
#### actual debugging begins here
# print some information about the filesystem
print('littlefs v%s.%s %dx%d %s, rev %08x, weight %d.%d' % (
print('littlefs v%s.%s %dx%d %s w%d.%d, rev %08x' % (
config.version[0] if config.version[0] is not None else '?',
config.version[1] if config.version[1] is not None else '?',
(config.geometry[0] or 0), (config.geometry[1] or 0),
mroot.addr(), mroot.rev, bweight//mleaf_weight, 1*mleaf_weight))
mroot.addr(),
bweight//mleaf_weight, 1*mleaf_weight,
mroot.rev))
# dynamically size the id field
w_width = max(