Cleaned up some comments around LFS_F_UNFLUSH/UNSYNC/ORPHAN

These have changed names a few times, and it's easy for comments to fall
out of date.
This commit is contained in:
Christopher Haster
2024-05-17 16:14:38 -05:00
parent f307892b32
commit 52bd47f0e5
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -9834,8 +9834,8 @@ int lfsr_file_opencfg(lfs_t *lfs, lfsr_file_t *file,
}
}
// mark as unsync and uncreat, we need to convert to reg file
// first sync
// mark as unsynced and orphaned, we need to convert to reg file
// on first sync
file->o.flags |= LFS_F_UNSYNC | LFS_F_ORPHAN;
} else {
@@ -11478,7 +11478,7 @@ int lfsr_file_sync(lfs_t *lfs, lfsr_file_t *file) {
// small files must be inlined entirely in our buffer
LFS_ASSERT(!lfsr_f_isunflush(file->o.flags)
|| file->buffer.size <= lfsr_file_inlinesize(lfs, file));
// uncreat files must be unsync
// orphaned files must be unsynced
LFS_ASSERT(!lfsr_f_isorphan(file->o.flags)
|| lfsr_f_isunsync(file->o.flags));
+3 -3
View File
@@ -139,9 +139,9 @@ enum lfs_open_flags {
#endif
// internally used flags
LFS_F_UNFLUSH = 0x1000, // File's data does not match storage
LFS_F_UNSYNC = 0x2000, // File's metadata does not match storage
LFS_F_ORPHAN = 0x4000, // File does not exist yet
LFS_F_UNFLUSH = 0x1000, // File's data does not match disk
LFS_F_UNSYNC = 0x2000, // File's metadata does not match disk
LFS_F_ORPHAN = 0x4000, // File does not exist
LFS_F_ZOMBIE = 0x8000, // File has been removed
};