public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: show error message when "mmc dev" command fails
@ 2016-02-10 12:46 Masahiro Yamada
  2016-02-10 12:49 ` Stefan Roese
  2016-02-10 16:27 ` Stephen Warren
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2016-02-10 12:46 UTC (permalink / raw)
  To: u-boot

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",
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-12 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-02-10 16:27 ` Stephen Warren
2016-02-12 14:55   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox