[PATCH 1/1] fs: ext4: all file paths are absolute

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Mar 20 14:39:56 CET 2024


On Wed, 20 Mar 2024 at 15:25, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> U-Boot only knows absolute file paths. It is inconsistent to require that
> saving to an ext4 file system should use a leading '/' wile reading does
> not. Remove the superfluous check.
>
> Reported-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  fs/ext4/ext4_common.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
> index ea9b92298ba..9eac6beef3b 100644
> --- a/fs/ext4/ext4_common.c
> +++ b/fs/ext4/ext4_common.c
> @@ -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)
> --
> 2.43.0
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list