From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Protsenko Date: Wed, 18 Jul 2018 01:09:11 +0300 Subject: [U-Boot] [RFC 1/2] env: Drop error messages when loading environment Message-ID: <20180717220912.11358-1-semen.protsenko@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is just a draft to discuss ideas related to "Make U-Boot log great again" thread. With this patch we will have something like this: Loading Environment from FAT... Failed (-5) Loading Environment from MMC... OK instead of this: Loading Environment from FAT... MMC: no card present ** Bad device mmc 0 ** Failed (-5) Loading Environment from MMC... OK Signed-off-by: Sam Protsenko --- env/env.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/env/env.c b/env/env.c index 5c0842ac07..85598fa5d4 100644 --- a/env/env.c +++ b/env/env.c @@ -187,6 +187,7 @@ int env_load(void) for (prio = 0; (drv = env_driver_lookup(ENVOP_LOAD, prio)); prio++) { int ret; + unsigned long have_console = gd->have_console; if (!drv->load) continue; @@ -195,7 +196,11 @@ int env_load(void) continue; printf("Loading Environment from %s... ", drv->name); + + /* Suppress console output for drv->load() */ + gd->have_console = 0; ret = drv->load(); + gd->have_console = have_console; if (ret) printf("Failed (%d)\n", ret); else -- 2.18.0