[U-Boot] [PATCH] fs: ext4: Do not print mount fail message when not ext4 filesystem

Marek BehĂșn marek.behun at nic.cz
Wed Mar 7 23:26:08 UTC 2018


Other filesystem drivers don't do this.

Signed-off-by: Marek Behun <marek.behun at nic.cz>
---
 fs/ext4/ext4_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index dac9545365..e3cc30a1e0 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2343,7 +2343,7 @@ int ext4fs_mount(unsigned part_length)
 
 	/* Make sure this is an ext2 filesystem. */
 	if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC)
-		goto fail;
+		goto fail_noerr;
 
 
 	if (le32_to_cpu(data->sblock.revision_level) == 0) {
@@ -2379,6 +2379,7 @@ int ext4fs_mount(unsigned part_length)
 	return 1;
 fail:
 	printf("Failed to mount ext2 filesystem...\n");
+fail_noerr:
 	free(data);
 	ext4fs_root = NULL;
 
-- 
2.16.1



More information about the U-Boot mailing list