summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPantelis Antoniou <panto@antoniou-consulting.com>2012-11-28 21:34:29 +0000
committerTom Rini <trini@ti.com>2013-02-15 14:25:53 -0500
commitcb80c958913604f307c4cb0f1cd936be8fc87fe8 (patch)
tree2455ac2ac6a891a17e97254b59cfc1a920718988 /common
parente8ae0fa5edd152b2b29c470b88429be4cdcd2c46 (diff)
mmc: Add an mmcsilent option
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>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mmc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 7dacd5114c..507ceef8b1 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -277,8 +277,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);
@@ -300,8 +301,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;
}