Added proper handling for removing open files

Conveniently we previously added a linked-list of files
for things like this. This should handle most of the corner
cases where files are open during strange operations.

This also brings up the point that we aren't doing anything similar
for directories and don't even have a dir linked-list. After thinking
about it for a while, I've decided to leave out this handling for dirs.
It will likely be very complicated, with little gains as directories
are less used in embedded systems. Additionally, dirs are only open
for reading, and corruption will probably just cause the dir iteration
to terminate. If needed, correct handling of open directories can be
added later.
This commit is contained in:
Christopher Haster
2017-04-30 12:35:50 -05:00
parent 8621b61f38
commit 63b52c9f2e
3 changed files with 213 additions and 2 deletions

View File

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