From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: show error message when "mmc dev" command fails
Date: Wed, 10 Feb 2016 13:49:52 +0100 [thread overview]
Message-ID: <56BB31F0.40604@denx.de> (raw)
In-Reply-To: <1455108396-31937-1-git-send-email-yamada.masahiro@socionext.com>
On 10.02.2016 13:46, Masahiro Yamada wrote:
> Currently, "mmc dev" can silently fail. In case of failure, tell
> the user about it.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> cmd/mmc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/mmc.c b/cmd/mmc.c
> index 1c7156f..87a9fb6 100644
> --- a/cmd/mmc.c
> +++ b/cmd/mmc.c
> @@ -463,8 +463,10 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
> }
>
> mmc = init_mmc_device(dev, true);
> - if (!mmc)
> + if (!mmc) {
> + printf("could not switch to mmc%d\n", dev);
> return CMD_RET_FAILURE;
> + }
>
> ret = mmc_select_hwpart(dev, part);
> printf("switch to partitions #%d, %s\n",
>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
next prev parent reply other threads:[~2016-02-10 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 12:46 [U-Boot] [PATCH] mmc: show error message when "mmc dev" command fails Masahiro Yamada
2016-02-10 12:49 ` Stefan Roese [this message]
2016-02-10 16:27 ` Stephen Warren
2016-02-12 14:55 ` Masahiro Yamada
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=56BB31F0.40604@denx.de \
--to=sr@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox