]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
UBIFS: Improve error message when reading superblock failed
authorBernhard Walle <walle@corscience.de>
Mon, 2 Apr 2012 01:58:34 +0000 (01:58 +0000)
committerWolfgang Denk <wd@denx.de>
Thu, 9 Aug 2012 20:12:16 +0000 (22:12 +0200)
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@corscience.de>
Use ubifs_err instead of printf.
Add "errno=%d" in output as suggested by Albert Aribaud.

Signed-off-by: Thomas Weber <weber@corscience.de>
fs/ubifs/super.c

index 26b48f029e76a032e0c3deb1445d34d1d921c4f5..30ccd98c22b3942bbb2a909a18d0ff3516953260 100644 (file)
@@ -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);
+               ubifs_err("Error reading superblock on volume '%s' errno=%d!\n", name, ret);
                return -1;
        }