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:
@@ -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
|
// mark as unsynced and orphaned, we need to convert to reg file
|
||||||
// first sync
|
// on first sync
|
||||||
file->o.flags |= LFS_F_UNSYNC | LFS_F_ORPHAN;
|
file->o.flags |= LFS_F_UNSYNC | LFS_F_ORPHAN;
|
||||||
|
|
||||||
} else {
|
} 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
|
// small files must be inlined entirely in our buffer
|
||||||
LFS_ASSERT(!lfsr_f_isunflush(file->o.flags)
|
LFS_ASSERT(!lfsr_f_isunflush(file->o.flags)
|
||||||
|| file->buffer.size <= lfsr_file_inlinesize(lfs, file));
|
|| 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)
|
LFS_ASSERT(!lfsr_f_isorphan(file->o.flags)
|
||||||
|| lfsr_f_isunsync(file->o.flags));
|
|| lfsr_f_isunsync(file->o.flags));
|
||||||
|
|
||||||
|
|||||||
@@ -139,9 +139,9 @@ enum lfs_open_flags {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// internally used flags
|
// internally used flags
|
||||||
LFS_F_UNFLUSH = 0x1000, // File's data does not match storage
|
LFS_F_UNFLUSH = 0x1000, // File's data does not match disk
|
||||||
LFS_F_UNSYNC = 0x2000, // File's metadata does not match storage
|
LFS_F_UNSYNC = 0x2000, // File's metadata does not match disk
|
||||||
LFS_F_ORPHAN = 0x4000, // File does not exist yet
|
LFS_F_ORPHAN = 0x4000, // File does not exist
|
||||||
LFS_F_ZOMBIE = 0x8000, // File has been removed
|
LFS_F_ZOMBIE = 0x8000, // File has been removed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user