summaryrefslogtreecommitdiff
path: root/common/cli.c
Commit message (Collapse)AuthorAgeLines
* Add run_command_repeatable()Thomas Betker2014-06-11-0/+24
| | | | | | | | | | run_command() returns 0 on success and 1 on error. However, there are some invocations which expect 0 or 1 for success (not repeatable or repeatable) and -1 for error; add run_command_repeatable() for this purpose. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* main: Make the execution path a little clearer in main.cSimon Glass2014-05-29-0/+66
| | | | | | | | | bootdelay_process() never returns in some circumstances, whichs makes the control flow confusing. Change it so that the decision about how to execute the boot command is made in the main_loop() code, so it is easier to follow. Move CLI stuff to cli.c. Signed-off-by: Simon Glass <sjg@chromium.org>
* main: Hide the hush/simple details inside cli.cSimon Glass2014-05-29-0/+22
| | | | | | | 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>
* Move command line API into cli.cSimon Glass2014-05-29-0/+106
We now have a single entry point to the CLI, whether simple or hush. Put this in its own file. Signed-off-by: Simon Glass <sjg@chromium.org>