From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 28 Jan 2009 10:38:39 +0100 Subject: [U-Boot] [PATCH 02/31] environment, netconsole: reducing packages when printing environment variables Message-ID: <4980279F.2020302@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 Actual, do_printenv () uses putc () to print the Environment- variables. If using netconsole, this will result in a lot of packages with single characters in it. With the new config option CONFIG_ENV_BUFFER_PRINT do_printenv () uses now puts () to print a complete Environmentvariable, so the number of packages when using netconsole are reduced. Signed-off-by: Heiko Schocher --- common/cmd_nvedit.c | 8 ++++++++ include/configs/mgcoge.h | 1 + include/configs/mgsuvd.h | 1 + 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 85025da..8f6310a 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -89,8 +89,12 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) for (i=0; env_get_char(i) != '\0'; i=nxt+1) { for (nxt=i; env_get_char(nxt) != '\0'; ++nxt) ; +#if defined(CONFIG_ENV_BUFFER_PRINT) + puts ((char *)( env_get_addr(nxt) + 1)); +#else for (k=i; k