aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2019-01-21 16:28:48 +0100
committerDave Wallace <dwallacelf@gmail.com>2019-04-05 22:50:54 +0000
commit05f7ca110bb67f73af69ded6b915ee70754fbb6f (patch)
tree8a89faeac97a25369d4afcbc913a0af871015b42 /src
parentc213089c2d8a5344d928f86f7e4fb6df3607bdf6 (diff)
make the output of "show api dump file <filename> compare-current" doxygen-friendly
The current output of the API diff requires some massaging to appear like a table in the docs generated by doxygen. This change eliminates this need. Change-Id: Ic9269a0e5e232e4d01a0695561e4f90eee287327 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/vlibmemory/vlib_api_cli.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c
index 2d8d4077871..4a86b8d76bb 100755
--- a/src/vlibmemory/vlib_api_cli.c
+++ b/src/vlibmemory/vlib_api_cli.c
@@ -1082,6 +1082,7 @@ dump_api_table_file_command_fn (vlib_main_t * vm,
if (compare_current)
{
+ u8 *dashes = 0;
ndifferences = 0;
/*
@@ -1090,8 +1091,11 @@ dump_api_table_file_command_fn (vlib_main_t * vm,
* are identical. Otherwise, the crc is different, or a message is
* present in only one of the tables.
*/
- vlib_cli_output (vm, "%=60s %s", "Message Name", "Result");
-
+ vlib_cli_output (vm, "%-60s | %s", "Message Name", "Result");
+ vec_validate_init_empty (dashes, 60, '-');
+ vec_terminate_c_string (dashes);
+ vlib_cli_output (vm, "%60s-|-%s", dashes, "-----------------");
+ vec_free (dashes);
for (i = 0; i < vec_len (table);)
{
/* Last message lonely? */
@@ -1118,20 +1122,20 @@ dump_api_table_file_command_fn (vlib_main_t * vm,
|| strcmp ((char *) table[i].name, (char *) table[i + 1].name))
{
last_unique:
- vlib_cli_output (vm, "%-60s only in %s",
+ vlib_cli_output (vm, "%-60s | only in %s",
table[i].name, table[i].which ?
"image" : "file");
i++;
continue;
}
/* In both tables, but with different signatures */
- vlib_cli_output (vm, "%-60s definition changed", table[i].name);
+ vlib_cli_output (vm, "%-60s | definition changed", table[i].name);
i += 2;
}
if (ndifferences == 0)
vlib_cli_output (vm, "No api message signature differences found.");
else
- vlib_cli_output (vm, "Found %u api message signature differences",
+ vlib_cli_output (vm, "\nFound %u api message signature differences",
ndifferences);
goto cleanup;
}