
Dear Simon Glass,
In message 1329285566-30386-9-git-send-email-sjg@chromium.org you wrote:
We currently have the same code in hush.c and main.c. This brings the code into one place.
As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1.
ARM code size increases about 32 bytes with this clean-up.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v4:
- Add a 'repeatable' parameter to cmd_process()
- Make cmd_process() return only success (0) or failure (1)
- Rationalise return codes to 0, 1 and usage
Changes in v5:
- Use existing #ifdef __ASSEMBLY__ rather than create a new one
common/command.c | 41 ++++++++++++++++++++++++++++++++++++++++- common/hush.c | 52 ++++++++++++---------------------------------------- common/main.c | 37 +------------------------------------ include/command.h | 29 ++++++++++++++++++++++++++++- 4 files changed, 81 insertions(+), 78 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk