Files
littlefs/scripts
Christopher Haster d08d254cd2 Switched to writing compat flags as le32s
Most of littlefs's metadata is encoded in leb128s now, with the
exception of tags (be16, sort of), revision counts (le32), cksums
(le32), and flags.

It makes sense for tags to be a special case, these are written and
rewritten _everywhere_, but less so for flags, which are only written to
the mroot and updated infrequently.

We might as well save a bit of code by reusing our le32 machinery.

---

This changes lfsr_format to just write out compat flags as le32s, saving
a tiny bit of code at the cost of a tiny bit of disk usage (the real
benefit being a tiny bit of code simplification):

           code          stack          ctx
  before: 37792           2608          620
  after:  37772 (-0.1%)   2608 (+0.0%)  620 (+0.0%)

Compat already need to handle trailing zeros gracefully, so this doesn't
change anything at mount time.

Also had to switch from enums to #defines thanks to C's broken enums.
Wooh. We already use #defines for the other flags for this reason.
2025-01-28 14:41:45 -06:00
..
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00
2025-01-28 14:41:45 -06:00