|
|
@@ -415,11 +415,11 @@ static inline uint8_t lfs_gstate_getorphans(const lfs_gstate_t *a) {
|
|
|
static inline bool lfs_gstate_hasmove(const lfs_gstate_t *a) {
|
|
|
return lfs_tag_type1(a->tag);
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
static inline bool lfs_gstate_needssuperblock(const lfs_gstate_t *a) {
|
|
|
return lfs_tag_size(a->tag) >> 9;
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
static inline bool lfs_gstate_hasmovehere(const lfs_gstate_t *a,
|
|
|
const lfs_block_t *pair) {
|
|
|
@@ -535,7 +535,6 @@ static int lfs_file_outline(lfs_t *lfs, lfs_file_t *file);
|
|
|
static int lfs_file_flush(lfs_t *lfs, lfs_file_t *file);
|
|
|
|
|
|
static int lfs_fs_deorphan(lfs_t *lfs, bool powerloss);
|
|
|
-static void lfs_fs_prepsuperblock(lfs_t *lfs, bool needssuperblock);
|
|
|
static int lfs_fs_preporphans(lfs_t *lfs, int8_t orphans);
|
|
|
static void lfs_fs_prepmove(lfs_t *lfs,
|
|
|
uint16_t id, const lfs_block_t pair[2]);
|
|
|
@@ -546,6 +545,8 @@ static lfs_stag_t lfs_fs_parent(lfs_t *lfs, const lfs_block_t dir[2],
|
|
|
static int lfs_fs_forceconsistency(lfs_t *lfs);
|
|
|
#endif
|
|
|
|
|
|
+static void lfs_fs_prepsuperblock(lfs_t *lfs, bool needssuperblock);
|
|
|
+
|
|
|
#ifdef LFS_MIGRATE
|
|
|
static int lfs1_traverse(lfs_t *lfs,
|
|
|
int (*cb)(void*, lfs_block_t), void *data);
|
|
|
@@ -4672,12 +4673,10 @@ static lfs_stag_t lfs_fs_parent(lfs_t *lfs, const lfs_block_t pair[2],
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#ifndef LFS_READONLY
|
|
|
static void lfs_fs_prepsuperblock(lfs_t *lfs, bool needssuperblock) {
|
|
|
lfs->gstate.tag = (lfs->gstate.tag & ~LFS_MKTAG(0, 0, 0x200))
|
|
|
| (uint32_t)needssuperblock << 9;
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
#ifndef LFS_READONLY
|
|
|
static int lfs_fs_preporphans(lfs_t *lfs, int8_t orphans) {
|