Adopted ternary LFS3_IFYES_* macros

This is hopefully a better alternative to LFS3_IFDEF_YES_* macros.

If we need special behavior for LFS3_IFDEF_YES_*, we almost always need
special behavior for LFS3_IFDEF_NO_* and LFS3_IFDEF_MAYBE_* as well.

So merging all three states into a single macro saves typing and
hopefully encourages correct handling of all cases.

No code changes.
This commit is contained in:
Christopher Haster
2025-12-29 15:16:31 -06:00
parent 7e00039fb4
commit 061d9531ab
8 changed files with 240 additions and 215 deletions
+1 -1
View File
@@ -15626,7 +15626,7 @@ static int lfs3_mountmroot(lfs3_t *lfs3, const lfs3_mdir_t *mroot) {
// optional wcompat flags
lfs3_wcompat_t wmask = ~(
LFS3_IFDEF_GBMAP(LFS3_IFDEF_YES_GBMAP(0, LFS3_WCOMPAT_GBMAP), 0));
LFS3_IFYES_GBMAP(0, LFS3_WCOMPAT_GBMAP, 0));
if ((wcompat_ & wmask) != (wcompat & wmask)) {
LFS3_WARN("Incompatible wcompat flags 0x%0"PRIx32" "
"(!= 0x%0"PRIx32" & ~0x%0"PRIx32")",