[U-Boot] [PATCH 00/17] fs: fat: extend FAT write operations
AKASHI Takahiro
takahiro.akashi at linaro.org
Fri Jul 20 02:57:06 UTC 2018
This patch series is an attempt to address FAT write related issues
in an effort of running UEFI SCT (Self-Certification Test) to verify
UEFI support on u-boot.
SCT is a test platform as well as an extentisive collection of test
cases for UEFI specification. It can run all the tests automatically
and save test results to dedicated log files.
AFAIK, what's missing in the current fat file system to safely run
SCT without errors (I don't mean test case failures) are:
* write a file located under sub-directories
* write a file with non-zero offset
* delete a file
* create a directory
Patch#1 to patch#6 are some sort of preparatory ones.
Patch#7 implements write with sub-directories path.
Patch#8 to patch#10 implement write with non-zero offset.
Patch#11 to patch#15 are related to creating a directory.
Patch#16 provides delete, but it doesn't actually delete a file
but instead return 0 with purging a file content, which is good
enough to run SCT for now.
Finally, patch#17 fixes a minor bug in fs-test.sh.
I applied this patch set on top of v2018.07 along with a couple of
yet-to--be-upstreamed UEFI-related patches, and could successfully
run unmodified SCT[1] on qemu-arm.
[1] http://uefi.org/testtools
AKASHI Takahiro (17):
fs: fat: extend get_fs_info() for write use
fs: fat: handle "." and ".." of root dir correctly with
fat_itr_resolve()
fs: fat: make directory iterator global for write use
fs: fat: assure iterator's ->dent belongs to ->clust
fs: fat: check and normailze file name
fs: fat: write returns error code instead of -1
fs: fat: support write with sub-directory path
fs: fat: refactor write interface for a file offset
fs: fat: support write with non-zero offset
cmd: fat: add offset parameter to fatwrite
fs: add mkdir interface
fs: fat: remember the starting cluster number of directory
fs: fat: support mkdir
cmd: fat: add fatmkdir command
efi_loader: file: support creating a directory
efi_loader: implement a pseudo "file delete"
fs-test: fix false positive error at Test Case 12
cmd/fat.c | 22 +-
fs/fat/fat.c | 98 ++--
fs/fat/fat_write.c | 1051 +++++++++++++++++++++++--------------
fs/fs.c | 46 ++
include/fat.h | 37 ++
include/fs.h | 10 +
lib/efi_loader/efi_file.c | 24 +-
test/fs/fs-test.sh | 2 +-
8 files changed, 825 insertions(+), 465 deletions(-)
--
2.17.0
More information about the U-Boot
mailing list