summaryrefslogtreecommitdiffstats
path: root/common/main.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-04-10 20:01:34 -0600
committerTom Rini <trini@ti.com>2014-05-29 17:51:42 -0400
commitc1bb2cd0b6a3d1b152be3686601234b3a363772b (patch)
tree3e9227a68f254ed1439c5091d00563860b0ce207 /common/main.c
parent1364a0e48a64a29930a8b22620f420e8f4984cc7 (diff)
downloadtalos-obmc-uboot-c1bb2cd0b6a3d1b152be3686601234b3a363772b.tar.gz
talos-obmc-uboot-c1bb2cd0b6a3d1b152be3686601234b3a363772b.zip
main: Hide the hush/simple details inside cli.c
Move these details from main (which doesn't care which parser is used) to cli.c where they belong. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/common/main.c b/common/main.c
index b4cf289dc5..8c846c84c8 100644
--- a/common/main.c
+++ b/common/main.c
@@ -10,7 +10,6 @@
#include <common.h>
#include <autoboot.h>
#include <cli.h>
-#include <cli_hush.h>
#include <malloc.h>
#include <version.h>
@@ -71,13 +70,7 @@ void main_loop(void)
setenv("ver", version_string); /* set version variable */
#endif /* CONFIG_VERSION_VARIABLE */
-#ifdef CONFIG_SYS_HUSH_PARSER
- u_boot_hush_start();
-#endif
-
-#if defined(CONFIG_HUSH_INIT_VAR)
- hush_init_var();
-#endif
+ cli_init();
run_preboot_environment_command();
@@ -89,11 +82,6 @@ void main_loop(void)
/*
* Main Loop for Monitor Command Processing
*/
-#ifdef CONFIG_SYS_HUSH_PARSER
- parse_file_outer();
- /* This point is never reached */
- for (;;);
-#else
+
cli_loop();
-#endif /*CONFIG_SYS_HUSH_PARSER*/
}
OpenPOWER on IntegriCloud