* [PATCH 1/1] fs: ext4: all file paths are absolute
@ 2024-03-20 13:25 Heinrich Schuchardt
2024-03-20 13:39 ` Ilias Apalodimas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2024-03-20 13:25 UTC (permalink / raw
To: Tom Rini
Cc: Patrice Chotard, Sean Anderson, Patrick Delaunay, Simon Glass,
u-boot, Heinrich Schuchardt
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@foss.st.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fs: ext4: all file paths are absolute
2024-03-20 13:25 [PATCH 1/1] fs: ext4: all file paths are absolute Heinrich Schuchardt
@ 2024-03-20 13:39 ` Ilias Apalodimas
2024-03-20 17:37 ` Patrice CHOTARD
2024-03-20 21:17 ` Michael Nazzareno Trimarchi
2 siblings, 0 replies; 4+ messages in thread
From: Ilias Apalodimas @ 2024-03-20 13:39 UTC (permalink / raw
To: Heinrich Schuchardt
Cc: Tom Rini, Patrice Chotard, Sean Anderson, Patrick Delaunay,
Simon Glass, u-boot
On Wed, 20 Mar 2024 at 15:25, Heinrich Schuchardt
<heinrich.schuchardt@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@foss.st.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@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@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fs: ext4: all file paths are absolute
2024-03-20 13:25 [PATCH 1/1] fs: ext4: all file paths are absolute Heinrich Schuchardt
2024-03-20 13:39 ` Ilias Apalodimas
@ 2024-03-20 17:37 ` Patrice CHOTARD
2024-03-20 21:17 ` Michael Nazzareno Trimarchi
2 siblings, 0 replies; 4+ messages in thread
From: Patrice CHOTARD @ 2024-03-20 17:37 UTC (permalink / raw
To: Heinrich Schuchardt, Tom Rini
Cc: Sean Anderson, Patrick Delaunay, Simon Glass, u-boot
On 3/20/24 14:25, Heinrich Schuchardt 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@foss.st.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@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)
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fs: ext4: all file paths are absolute
2024-03-20 13:25 [PATCH 1/1] fs: ext4: all file paths are absolute Heinrich Schuchardt
2024-03-20 13:39 ` Ilias Apalodimas
2024-03-20 17:37 ` Patrice CHOTARD
@ 2024-03-20 21:17 ` Michael Nazzareno Trimarchi
2 siblings, 0 replies; 4+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-03-20 21:17 UTC (permalink / raw
To: Heinrich Schuchardt
Cc: Tom Rini, Patrice Chotard, Sean Anderson, Patrick Delaunay,
Simon Glass, u-boot
On Wed, Mar 20, 2024 at 2:25 PM Heinrich Schuchardt
<heinrich.schuchardt@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.
>
Just a typo, "wile reading"
Michael
> Reported-by: Patrice Chotard <patrice.chotard@foss.st.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@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
>
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-20 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 13:25 [PATCH 1/1] fs: ext4: all file paths are absolute Heinrich Schuchardt
2024-03-20 13:39 ` Ilias Apalodimas
2024-03-20 17:37 ` Patrice CHOTARD
2024-03-20 21:17 ` Michael Nazzareno Trimarchi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.