]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: ext4: all file paths are absolute
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 27 Mar 2024 08:09:27 +0000 (09:09 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 10 Apr 2024 15:34:53 +0000 (09:34 -0600)
U-Boot only knows absolute file paths. It is inconsistent to require that
saving to an ext4 file system should use a leading '/' while reading does
not. Remove the superfluous check.

Reported-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
fs/ext4/ext4_common.c

index 365c5147c4bf8a53b964e7fefd37dac451557b89..2ff0dca2495e2b13192ad3ccf25978d3af1fdea7 100644 (file)
@@ -765,11 +765,6 @@ int ext4fs_get_parent_inode_num(const char *dirname, char *dname, int flags)
        struct ext2_inode *first_inode = NULL;
        struct ext2_inode temp_inode;
 
-       if (*dirname != '/') {
-               printf("Please supply Absolute path\n");
-               return -1;
-       }
-
        /* TODO: input validation make equivalent to linux */
        depth_dirname = zalloc(strlen(dirname) + 1);
        if (!depth_dirname)