]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/archelp: If path given to grub_archelp_dir() is not a directory return error
authorGlenn Washburn <development@efficientek.com>
Mon, 14 Aug 2023 06:03:41 +0000 (01:03 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 14 Aug 2023 16:07:24 +0000 (18:07 +0200)
commitfcbea18c584257adc824cbb1c66cec2f4329869c
tree86711c7cb2d4ea3e05a5e29183241a89b1a9266d
parent1de58326994b0045ccfb28017d05fc1ddecdb92d
fs/archelp: If path given to grub_archelp_dir() is not a directory return error

Specifically, return GRUB_ERR_BAD_FILE_TYPE because this is what is
expected by the ls command when it is given a path to a non-directory.
This fixes a bug where calling ls with a list of non-directory paths
outputs a blank line for each such argument.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/archelp.c