From: Thomas Weber <thomas.weber.linux@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed
Date: Tue, 15 May 2012 22:33:31 +0200 [thread overview]
Message-ID: <4FB2BD9B.1010303@gmail.com> (raw)
In-Reply-To: <1333367914-20461-1-git-send-email-weber@corscience.de>
Ccing Albert
Thomas
On 04/02/2012 01:58 PM, Thomas Weber wrote:
> From: Bernhard Walle <walle@corscience.de>
>
> 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 | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index 26b48f0..30ccd98 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);
> + ubifs_err("Error reading superblock on volume '%s' errno=%d!\n", name, ret);
> return -1;
> }
>
next prev parent reply other threads:[~2012-05-15 20:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 17:15 [U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed Bernhard Walle
2012-02-17 14:15 ` Detlev Zundel
2012-02-17 14:31 ` Bernhard Walle
2012-02-17 15:00 ` Detlev Zundel
2012-02-20 8:44 ` Bernhard Walle
2012-02-20 8:59 ` Albert ARIBAUD
2012-02-20 9:11 ` Bernhard Walle
2012-02-20 10:01 ` Albert ARIBAUD
2012-04-02 11:58 ` Thomas Weber
2012-05-15 20:33 ` Thomas Weber [this message]
2012-08-09 20:12 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB2BD9B.1010303@gmail.com \
--to=thomas.weber.linux@googlemail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.