[U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed

Bernhard Walle walle at corscience.de
Thu Feb 9 18:15:02 CET 2012


In addition to the error message also display the error code. I had the
problem that my malloc memory was not enough (ENOMEM), and if u-boot
had displayed the error code immediately that would have saved me some
debugging.

Signed-off-by: Bernhard Walle <walle at corscience.de>
---
 fs/ubifs/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 26b48f0..0b1440b 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1191,7 +1191,7 @@ int ubifs_mount(char *vol_name)
 	mnt = NULL;
 	ret = ubifs_get_sb(&ubifs_fs_type, flags, name, data, mnt);
 	if (ret) {
-		printf("Error reading superblock on volume '%s'!\n", name);
+		printf("Error reading superblock on volume '%s': %d!\n", name, -ret);
 		return -1;
 	}
 
-- 
1.7.9



More information about the U-Boot mailing list