diff mbox series

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

Message ID 20240327080927.21401-1-heinrich.schuchardt@canonical.com
State Accepted
Commit 4ed2b1af4599a36584e9195b50bbfcdf06d0f613
Delegated to: Tom Rini
Headers show
Series [v2,1/1] fs: ext4: all file paths are absolute | expand

Commit Message

Heinrich Schuchardt March 27, 2024, 8:09 a.m. UTC
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>
---
v2:
	fix typo in commit message
---
 fs/ext4/ext4_common.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Tom Rini April 10, 2024, 5:43 p.m. UTC | #1
On Wed, 27 Mar 2024 09:09:27 +0100, 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 '/' while reading does
> not. Remove the superfluous check.
> 
> 

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 365c5147c4b..2ff0dca2495 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)