Separated type/struct fields in dir entries

The separation of data-structure vs entry type has been implicit for a
while now, and even taken advantage of to simplify the traverse logic.
This commit is contained in:
Christopher Haster
2018-03-03 10:26:06 -06:00
parent 58f3bb1f08
commit 5937fd79dd
2 changed files with 38 additions and 32 deletions

12
lfs.h
View File

@@ -74,9 +74,15 @@ enum lfs_error {
// File types
enum lfs_type {
LFS_TYPE_REG = 0x11,
LFS_TYPE_DIR = 0x22,
LFS_TYPE_SUPERBLOCK = 0x2e,
// file type
LFS_TYPE_REG = 0x01,
LFS_TYPE_DIR = 0x02,
LFS_TYPE_SUPERBLOCK = 0x0e,
// on disk structure
LFS_STRUCT_CTZ = 0x10,
LFS_STRUCT_DIR = 0x20,
LFS_STRUCT_MOVED = 0x80,
};
// File open flags