Dropped implicit multi-bit flags
- LFS_O_FLUSH 0x0040 -> 0x0040
- LFS_O_SYNC 0x00c0 -> 0x0080
- LFS_T_CKMETA 0x0100 -> 0x0100
- LFS_T_CKDATA 0x0300 -> 0x0200
This is just simpler and should avoid any surprises for both devs and
users.
This has no impact on code size:
code stack
before: 35448 2680
after: 35448 (+0.0%) 2680 (+0.0%)
This commit is contained in:
@@ -8265,7 +8265,7 @@ static inline bool lfsr_t_isckmeta(uint32_t flags) {
|
||||
}
|
||||
|
||||
static inline bool lfsr_t_isckdata(uint32_t flags) {
|
||||
return flags & (LFS_T_CKDATA ^ LFS_T_CKMETA);
|
||||
return flags & LFS_T_CKDATA;
|
||||
}
|
||||
|
||||
static inline bool lfsr_f_isdirty(uint32_t flags) {
|
||||
@@ -8604,6 +8604,7 @@ static int lfsr_mtree_traverse(lfs_t *lfs, lfsr_traversal_t *t,
|
||||
|
||||
// validate btree nodes? note mdirs are already validated
|
||||
if ((lfsr_t_isckmeta(t->o.o.flags)
|
||||
|| lfsr_t_isckdata(t->o.o.flags)
|
||||
// we also need to fetch to know if we need to compact
|
||||
|| lfsr_t_iscompact(t->o.o.flags))
|
||||
&& tag == LFSR_TAG_BRANCH) {
|
||||
@@ -9805,7 +9806,7 @@ static inline bool lfsr_o_isflush(uint32_t flags) {
|
||||
}
|
||||
|
||||
static inline bool lfsr_o_issync(uint32_t flags) {
|
||||
return flags & (LFS_O_SYNC ^ LFS_O_FLUSH);
|
||||
return flags & LFS_O_SYNC;
|
||||
}
|
||||
|
||||
static inline bool lfsr_o_isdesync(uint32_t flags) {
|
||||
|
||||
Reference in New Issue
Block a user