From e70f04fb8d69b9e02af608ec4b292bdf2f37c915 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 20 Feb 2024 12:54:23 +0100 Subject: ext4: detect directories in ext4fs_exists() While fat_exists() reports directories and files as existing ext4fs_exists() only recognizes files. This lead to errors when using systemd-boot with an ext4 file-system. Change ext4fs_exists() to find any type of inode: files, directories, symbolic links. Fixes: a1596438a689 ("ext4fs ls load support") Signed-off-by: Heinrich Schuchardt --- fs/ext4/ext4_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/ext4/ext4_common.h') diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h index 504c708b064..84500e990aa 100644 --- a/fs/ext4/ext4_common.h +++ b/fs/ext4/ext4_common.h @@ -54,6 +54,8 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, loff_t len, char *buf, loff_t *actread); int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, struct ext2fs_node **foundnode, int expecttype); +int ext4fs_find_file1(const char *currpath, struct ext2fs_node *currroot, + struct ext2fs_node **currfound, int *foundtype); int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, struct ext2fs_node **fnode, int *ftype); -- cgit v1.2.3