diff options
author | Damien George <damien@micropython.org> | 2021-01-28 13:13:09 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-01-29 15:02:55 +1100 |
commit | d1945cc2b56bb2159224fa7027d0aadb2362430c (patch) | |
tree | 43da1d3eaf2c4b7aca5ff4b18ca58fe8d3e6a179 /lib/timeutils/timeutils.h | |
parent | 71ea438561b737de7d4bb6bc60412a7e409cf298 (diff) |
stm32/main: Check block 0 and 1 when auto-detecting littlefs.
The superblock for littlefs is in block 0 and 1, but block 0 may be erased
or partially written, so block 1 must be checked if block 0 does not have a
valid littlefs superblock in it.
Prior to this commit, if block 0 did not contain a valid littlefs
superblock (but block 1 did) then the auto-detection would fail, mounting a
FAT filesystem would also fail, and the system would reformat the flash,
even though it may have contained a valid littlefs filesystem. This is now
fixed.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'lib/timeutils/timeutils.h')
0 files changed, 0 insertions, 0 deletions