rdonly: Added missing isrdonly flag overrides when LFS3_RDONLY
I did override lfs3_o_isrdonly, but missed lfs3_m_isrdonly and
lfs3_t_isrdonly.
These aren't strictly necessary (asserts force rdonly flags to be set
correctly), but can save code by trimming unreachable code paths.
That being said, currently no observable code savings:
code stack ctx
rdonly before: 10664 840 524
rdonly after: 10664 (+0.0%) 840 (+0.0%) 524 (+0.0%)
But I noticed while toying around with a different way of pruning
LFS3_TSTATE_OMDIRS/OBTREE and wanted to make sure other code savings
weren't dragged in.
This commit is contained in:
@@ -6926,7 +6926,12 @@ static inline bool lfs3_a_islazy(uint32_t flags) {
|
||||
|
||||
// traversal flags
|
||||
static inline bool lfs3_t_isrdonly(uint32_t flags) {
|
||||
(void)flags;
|
||||
#ifndef LFS3_RDONLY
|
||||
return flags & LFS3_T_RDONLY;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool lfs3_t_ismtreeonly(uint32_t flags) {
|
||||
@@ -7018,7 +7023,12 @@ static inline uint32_t lfs3_t_swapdirty(uint32_t flags) {
|
||||
|
||||
// mount flags
|
||||
static inline bool lfs3_m_isrdonly(uint32_t flags) {
|
||||
(void)flags;
|
||||
#ifndef LFS3_RDONLY
|
||||
return flags & LFS3_M_RDONLY;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef LFS3_REVDBG
|
||||
|
||||
Reference in New Issue
Block a user