]> git.sur5r.net Git - u-boot/commit
fs: add fs_readdir()
authorRob Clark <robdclark@gmail.com>
Sat, 9 Sep 2017 17:15:55 +0000 (13:15 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 15 Sep 2017 13:03:11 +0000 (09:03 -0400)
commit4bbcc965f995564870ca02606137e60e873e0a1f
treea9fb3e5b47d09bba0d1c4c565709231fd7906b24
parent8eafae209c35932d9a6560809c55ee4641534236
fs: add fs_readdir()

Needed to support efi file protocol.  The fallback.efi loader wants
to be able to read the contents of the /EFI directory to find an OS
to boot.

Modelled after POSIX opendir()/readdir()/closedir().  Unlike the other
fs APIs, this is stateful (ie. state is held in the FS_DIR "directory
stream"), to avoid re-traversing of the directory structure at each
step.  The directory stream must be released with closedir() when it
is no longer needed.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Ɓukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
disk/part.c
fs/fs.c
include/fs.h
include/part.h