Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-07-27 04:09:24 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-27 04:09:24 +0300
commit51fabc672b43a6285bced7e6574989cfc203ebd9 (patch)
tree5861f90e4df3a7ec43ceccb757b4f93cbec36152 /scripts
parent72e3bb44482e417d8a0408ecd16cb7ef96a6c2fc (diff)
Switched to using hex for blocks and ids in debug output
This is a minor quality of life change to help debugging, specifically when debugging test failures. Before, the test framework used hex, while the log output used decimal. This was slightly annoying to convert between. Why not output lengths/offset in hex? I don't have a big reason. I find it easier to reason about lengths in decimal and ids (such as addresses or block numbers) in hex. But this may just be me.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/debug.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/debug.py b/scripts/debug.py
index f8c0484..ba7525d 100755
--- a/scripts/debug.py
+++ b/scripts/debug.py
@@ -95,7 +95,7 @@ def main(*blocks):
print '%04x: %08x %-15s %3s %4s %-23s %-8s' % (
off, tag,
typeof(type) + (' bad!' if iscrc and ~crc else ''),
- id if id != 0x3ff else '.',
+ hex(id)[2:] if id != 0x3ff else '.',
size if size != 0x3ff else 'x',
' '.join('%02x' % ord(c) for c in data[:8]),
''.join(c if c >= ' ' and c <= '~' else '.' for c in data[:8]))