[U-Boot] [PATCH 0/3] Fix command repeat
thomas.betker at freenet.de
thomas.betker at freenet.de
Wed Jun 4 00:00:14 CEST 2014
From: Thomas Betker <thomas.betker at rohde-schwarz.com>
The intent of these patches is to get command repeat to work again. The
issue is that run_command() returns 0 on success, 1 on error. In order
to get command repeat to work, we need a variant which returns -1 on
error and 0/1 (non-repeatable/repeatable) on succcess, the same way as
cli_simple_run_command() does.
Patch 2 adds the run_command_repeatable() function, and patch 3
replaces run_command() by run_command_repeatable() where necessary.
Patch 1 is a cleanup of places which call run_command(), but expect it
to return -1 on error. This is actually independent of the other two
patches -- it just came up when checking run_command() invocations in
general.
Simon: I am not sure how and where to add a test for this, so I had to
omit this for now. The only test case I found is in test/command_ut.c,
which ignores the return code. I guess you have something in mind
already, so please go ahead ...
Best regards,
Thomas Betker
Thomas Betker (3):
Check run_command() return code properly
Add run_command_repeatable()
Use run_command_repeatable()
arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 2 +-
board/gdsys/p1022/controlcenterd.c | 6 +-----
common/cli.c | 24 ++++++++++++++++++++++++
common/cli_simple.c | 2 +-
common/cmd_bedbug.c | 2 +-
common/cmd_bootm.c | 6 +-----
include/common.h | 1 +
7 files changed, 30 insertions(+), 13 deletions(-)
--
1.7.9.5
More information about the U-Boot
mailing list