[U-Boot] [PATCH v3 4/9] fs: add fs_readdir()

Simon Glass
2017-09-12T12:29:11Z

[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1012 bytes --]

On 9 September 2017 at 11:15, Rob Clark <robdclark@gmail.com> wrote:
> 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>
> ---
> disk/part.c | 31 ++++++++++-------
> fs/fs.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> include/fs.h | 67 +++++++++++++++++++++++++++++++++++++
> include/part.h | 9 +++++
> 4 files changed, 199 insertions(+), 12 deletions(-)

I do think it is useful to see a change log on each patch.

Reviewed-by: Simon Glass <sjg@chromium.org>