public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: Add an mmcsilent option
@ 2012-11-29  7:34 Pantelis Antoniou
  2012-11-28 16:04 ` Wolfgang Denk
  2012-11-28 16:49 ` Andy Fleming
  0 siblings, 2 replies; 5+ messages in thread
From: Pantelis Antoniou @ 2012-11-29  7:34 UTC (permalink / raw)
  To: u-boot

When using MMC commands for dfu there is considerable noise.
Suppress mmc messages when mmcsilent is set.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 common/cmd_mmc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 4c19df7..73383f3 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -278,8 +278,9 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			return 1;
 		}
 
-		printf("\nMMC %s: dev # %d, block # %d, count %d ... ",
-				argv[1], curr_device, blk, cnt);
+		if (getenv("mmcsilent") == NULL)
+			printf("\nMMC %s: dev # %d, block # %d, count %d ... ",
+					argv[1], curr_device, blk, cnt);
 
 		mmc_init(mmc);
 
@@ -301,8 +302,9 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			BUG();
 		}
 
-		printf("%d blocks %s: %s\n",
-				n, argv[1], (n == cnt) ? "OK" : "ERROR");
+		if (getenv("mmcsilent") == NULL)
+			printf("%d blocks %s: %s\n",
+					n, argv[1], (n == cnt) ? "OK" : "ERROR");
 		return (n == cnt) ? 0 : 1;
 	}
 
-- 
1.7.12

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

end of thread, other threads:[~2012-11-29 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29  7:34 [U-Boot] [PATCH] mmc: Add an mmcsilent option Pantelis Antoniou
2012-11-28 16:04 ` Wolfgang Denk
2012-11-28 16:49 ` Andy Fleming
2012-11-28 16:50   ` Pantelis Antoniou
2012-11-29 15:57     ` Tom Rini

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