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:
@@ -11,12 +11,16 @@ TEST
|
||||
|
||||
echo "--- Invalid superblocks ---"
|
||||
ln -f -s /dev/null blocks/0
|
||||
ln -f -s /dev/null blocks/1
|
||||
tests/test.py << TEST
|
||||
lfs_format(&lfs, &config) => LFS_ERROR_CORRUPT;
|
||||
TEST
|
||||
rm blocks/0
|
||||
rm blocks/0 blocks/1
|
||||
|
||||
echo "--- Basic mounting ---"
|
||||
tests/test.py << TEST
|
||||
lfs_format(&lfs, &config) => 0;
|
||||
TEST
|
||||
tests/test.py << TEST
|
||||
lfs_mount(&lfs, &config) => 0;
|
||||
lfs_unmount(&lfs) => 0;
|
||||
|
||||
Reference in New Issue
Block a user