Add run_command_repeatable()

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>
This commit is contained in:
Thomas Betker
2014-06-05 20:07:57 +02:00
committed by Tom Rini
parent 73671dad49
commit 1d43bfd2d5
2 changed files with 25 additions and 0 deletions

View File

@@ -271,6 +271,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
/* common/main.c */
void main_loop (void);
int run_command(const char *cmd, int flag);
int run_command_repeatable(const char *cmd, int flag);
/**
* Run a list of commands separated by ; or even \0