Skip to content
Snippets Groups Projects
Commit 9d12d5d4 authored by Simon Glass's avatar Simon Glass Committed by Wolfgang Denk
Browse files

Add cmd_process() to process commands in one place


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: default avatarSimon Glass <sjg@chromium.org>
parent 7344f912
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment