cli: Add return value in cli_inband 91/19491/2
authorOle Troan <ot@cisco.com>
Fri, 10 May 2019 10:01:10 +0000 (12:01 +0200)
committerPaul Vinciguerra <pvinci@vinciconsulting.com>
Fri, 10 May 2019 21:50:34 +0000 (21:50 +0000)
commit72d8758fdc2266b9f4cd53063da2d23f0855c1df
tree972c5260846e3cc5c10a9be8c6318812ed5faa75
parentf89a6de8f032536080c4a11b267bf921093d3740
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>
src/vlib/cli.c
src/vlib/cli.h
src/vpp/api/api.c
test/test_cli.py [new file with mode: 0644]