
On 21 June 2018 at 06:58, Michal Simek michal.simek@xilinx.com wrote:
command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately.
These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c
And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails.
Signed-off-by: Michal Simek michal.simek@xilinx.com
Changes in v2:
- Separated patch from 1/2
- Extend description in command.h
common/command.c | 3 +++ include/command.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromum.org