Cleaned up several TODOs

Other than removed outdated TODOs, there are several tweaks:
- Standardized naming of fs-level functions (mostly internal names)
- Tweaked low-level use of subtype to hopefully take advantage of
  redundant code removal
- Moved root-handling into lfs_dir_getinfo
- Updated DEBUG statements around move/orphan fixes
- Removed trailing 1s in type fields
- Removed unused code
This commit is contained in:
Christopher Haster
2018-08-01 05:52:48 -05:00
parent 01d837e08d
commit bd1e0c4059
2 changed files with 85 additions and 365 deletions

8
lfs.h
View File

@@ -104,13 +104,13 @@ enum lfs_type {
LFS_TYPE_USER = 0x100,
LFS_TYPE_SUPERBLOCK = 0x010,
LFS_TYPE_NAME = 0x000,
LFS_TYPE_DELETE = 0x03f,
LFS_TYPE_DELETE = 0x030,
LFS_TYPE_STRUCT = 0x040,
LFS_TYPE_GLOBALS = 0x080,
LFS_TYPE_TAIL = 0x0c0,
LFS_TYPE_SOFTTAIL = 0x0c0,
LFS_TYPE_HARDTAIL = 0x0c1,
LFS_TYPE_CRC = 0x0ff, // TODO are trailing ones useful?
LFS_TYPE_CRC = 0x0f0, // TODO are trailing ones useful?
LFS_TYPE_INLINESTRUCT = 0x040,
LFS_TYPE_CTZSTRUCT = 0x041,
@@ -119,8 +119,8 @@ enum lfs_type {
// internal chip sources
LFS_FROM_REGION = 0x000,
LFS_FROM_DISK = 0x200,
LFS_FROM_MOVE = 0x030,
LFS_FROM_ATTRS = 0x020,
LFS_FROM_MOVE = 0x021,
LFS_FROM_ATTRS = 0x022,
};
// File open flags