cli: Add return value in cli_inband
Even when a CLI command called through the cli_inband API failed the API would return 0 (SUCCESS). This patch fixes that, but since most CLI handlers return error->code == 0, in most failure cases it will return -1 (UNSPECIFIED ERROR). Type: fix Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6 Signed-off-by: Ole Troan <ot@cisco.com>
This commit is contained in:

committed by
Paul Vinciguerra

parent
f89a6de8f0
commit
72d8758fdc
@ -186,10 +186,10 @@ static __clib_unused vlib_cli_command_t __clib_unused_##x
|
||||
void vlib_cli_output (struct vlib_main_t *vm, char *fmt, ...);
|
||||
|
||||
/* Process CLI input. */
|
||||
void vlib_cli_input (struct vlib_main_t *vm,
|
||||
unformat_input_t * input,
|
||||
vlib_cli_output_function_t * function,
|
||||
uword function_arg);
|
||||
int vlib_cli_input (struct vlib_main_t *vm,
|
||||
unformat_input_t * input,
|
||||
vlib_cli_output_function_t * function,
|
||||
uword function_arg);
|
||||
|
||||
clib_error_t *vlib_cli_register (struct vlib_main_t *vm,
|
||||
vlib_cli_command_t * c);
|
||||
|
Reference in New Issue
Block a user