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

Simon Glass sjg at chromium.org
Tue Sep 12 12:29:11 UTC 2017


On 9 September 2017 at 11:15, Rob Clark <robdclark at 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 at gmail.com>
> Reviewed-by: Ɓukasz Majewski <lukma at 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 at chromium.org>


More information about the U-Boot mailing list