From: Simon Glass <sjg@chromium.org>
Date: Tue, 14 Feb 2012 19:59:22 +0000 (+0000)
Subject: Don't include standard parser if hush is used
X-Git-Tag: v2025.01-rc5-pxa1908~17674^2~268
X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-logo.png?a=commitdiff_plain;h=7fed89e00e0836f7894f350716b3f182ee562760;p=u-boot.git

Don't include standard parser if hush is used

This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER
defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/common/main.c b/common/main.c
index 10ee12c278..637da2b4d3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -1132,6 +1132,7 @@ int parse_line (char *line, char *argv[])
 
 /****************************************************************************/
 
+#ifndef CONFIG_SYS_HUSH_PARSER
 static void process_macros (const char *input, char *output)
 {
 	char c, prev;
@@ -1382,6 +1383,7 @@ static int builtin_run_command(const char *cmd, int flag)
 
 	return rc ? rc : repeatable;
 }
+#endif
 
 /*
  * Run a command using the selected parser.