From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 10 Feb 2016 13:49:52 +0100 Subject: [U-Boot] [PATCH] mmc: show error message when "mmc dev" command fails In-Reply-To: <1455108396-31937-1-git-send-email-yamada.masahiro@socionext.com> References: <1455108396-31937-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <56BB31F0.40604@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > > 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 Thanks, Stefan