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:
Christopher Haster
2024-07-10 23:59:58 -05:00
parent e4b6496e09
commit 0e34c46608
2 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -137,7 +137,7 @@ enum lfs_open_flags {
LFS_O_TRUNC = 0x0010, // Truncate the existing file to zero size
LFS_O_APPEND = 0x0020, // Move to end of file on every write
LFS_O_FLUSH = 0x0040, // Flush data on every write
LFS_O_SYNC = 0x00c0, // Sync metadata on every write
LFS_O_SYNC = 0x0080, // Sync metadata on every write
LFS_O_DESYNC = 0x0100, // Do not sync or recieve file updates
#endif
@@ -173,10 +173,10 @@ enum lfs_traversal_flags {
LFS_T_LOOKAHEAD = 0x0040, // Populate lookahead buffer
LFS_T_COMPACT = 0x0080, // Compact metadata logs
LFS_T_CKMETA = 0x0100, // Check metadata checksums
LFS_T_CKDATA = 0x0300, // Check metadata + data checksums
LFS_T_CKDATA = 0x0200, // Check metadata + data checksums
// TODO
// LFS_T_REPAIRMETA = 0x0400, // Repair metadata blocks
// LFS_T_REPAIRDATA = 0x0c00, // Repair metadata + data blocks
// LFS_T_REPAIRDATA = 0x0800, // Repair metadata + data blocks
// internally used flags
LFS_F_DIRTY = 0x1000, // Filesystem modified during traversal