]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Add cmd_process() to process commands in one place
authorSimon Glass <sjg@chromium.org>
Tue, 14 Feb 2012 19:59:25 +0000 (19:59 +0000)
committerWolfgang Denk <wd@denx.de>
Tue, 6 Mar 2012 20:09:41 +0000 (21:09 +0100)
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>

No differences found