]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: correct reading of directories
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 7 Sep 2019 20:34:07 +0000 (22:34 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 9 Sep 2019 13:21:08 +0000 (15:21 +0200)
commit95f9947ac3c98175be580310caee4904ec01df8f
treebbbb1f4d57e019c0780df6d8f8162f25f76b0744
parenta6f161633705a41a1588128cde7d7f67e4ecbcb0
efi_loader: correct reading of directories

EFI_FILE_PROTOCOL.Read() is used both to read files and directories.

When reaching the end of a directory we always have to return buffer size
zero irrespective of the incoming buffer size. (The described scenario for
a Shim quirk cannot arise because every directory has at least '.' and '..'
as entries.)

Even when the buffer_size is too small multiple times we have to keep a
reference to our last read directory entry.

When we return to the start of the directory via SetPosition() we must
remove the reference to a previously kept directory entry.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_file.c