diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2021-05-05 13:12:58 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-05-07 14:04:49 +0300 |
commit | f87aee3a765c749717a80a9c8de401b2942c1aff (patch) | |
tree | 94f4a56f3747cd2b79dad6a7d2af6f0fb56b1472 /helper/cli.c | |
parent | 341ebb9fcfb54a09bbad60eafb9c29b8473d2a08 (diff) |
helper: cli: add command "call odp_queue_print_all"
Add a CLI command, which calls the new odp_queue_print_all() API
function.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper/cli.c')
-rw-r--r-- | helper/cli.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/helper/cli.c b/helper/cli.c index 14f9d57b8..8dc47858b 100644 --- a/helper/cli.c +++ b/helper/cli.c @@ -184,6 +184,18 @@ static int cmd_call_odp_queue_print(struct cli_def *cli, return CLI_OK; } +static int cmd_call_odp_queue_print_all(struct cli_def *cli, + const char *command ODP_UNUSED, + char *argv[] ODP_UNUSED, int argc) +{ + if (check_num_args(cli, argc, 0)) + return CLI_ERROR; + + odp_queue_print_all(); + + return CLI_OK; +} + static int cmd_call_odp_shm_print(struct cli_def *cli, const char *command ODP_UNUSED, char *argv[], int argc) @@ -230,6 +242,9 @@ static struct cli_def *create_cli(void) cli_register_command(cli, c, "odp_queue_print", cmd_call_odp_queue_print, PRIVILEGE_UNPRIVILEGED, MODE_EXEC, "<name>"); + cli_register_command(cli, c, "odp_queue_print_all", + cmd_call_odp_queue_print_all, + PRIVILEGE_UNPRIVILEGED, MODE_EXEC, NULL); cli_register_command(cli, c, "odp_shm_print_all", cmd_call_odp_shm_print_all, PRIVILEGE_UNPRIVILEGED, MODE_EXEC, NULL); |