Restructured directory code

After quite a bit of prototyping, settled on the following functions:
- lfs_dir_alloc  - create a new dir
- lfs_dir_fetch  - load and check a dir pair from disk
- lfs_dir_commit - save a dir pair to disk
- lfs_dir_shift  - shrink a dir pair to disk
- lfs_dir_append - add a dir entry, creating dirs if needed
- lfs_dir_remove - remove a dir entry, dropping dirs if needed

Additionally, followed through with a few other tweaks
This commit is contained in:
Christopher Haster
2017-04-17 22:27:06 -05:00
parent bd817abb00
commit 3b9d6630c8
6 changed files with 441 additions and 598 deletions

View File

@@ -31,7 +31,7 @@ size: $(OBJ)
$(SIZE) -t $^
.SUFFIXES:
test: test_format test_dirs test_files test_alloc test_orphan test_paths
test: test_format test_dirs test_files test_alloc test_paths test_orphan
test_%: tests/test_%.sh
./$<