2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpctl: Stop showing the dpctl/help command.

'dpctl/help' command is not registered and could not be called.
However, 'dpctl/list-commands' prints it as available.

CC: Ben Pfaff <blp@ovn.org>
Fixes: 337c452854 ("dpctl: Fix jump through wild pointer in "dpctl/help".")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ilya Maximets
2019-03-15 17:06:01 +03:00
committed by Ben Pfaff
parent 9a7df6f3cf
commit 2fc160f503

View File

@@ -1348,6 +1348,10 @@ dpctl_list_commands(int argc OVS_UNUSED, const char *argv[] OVS_UNUSED,
for (; commands->name; commands++) {
const struct dpctl_command *c = commands;
if (dpctl_p->is_appctl && !strcmp(c->name, "help")) {
continue;
}
ds_put_format(&ds, " %s%-23s %s\n", dpctl_p->is_appctl ? "dpctl/" : "",
c->name, c->usage);
}