Currently, ovs-ofctl and ovs-dpctl allow a 'help' keyword, in addition to -h and --help. However, ovs-vsctl does not honor the same 'help' keyword. This change adds a 'help' which redirects to usage(), bringing ovs-vsctl in line with ovs-ofctl and ovs-dpctl.
Signed-off-by: Aaron Conole <acon...@redhat.com> --- utilities/ovs-vsctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 36290db..5d5983d 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -92,7 +92,7 @@ static struct ovsdb_idl *the_idl; static struct ovsdb_idl_txn *the_idl_txn; OVS_NO_RETURN static void vsctl_exit(int status); -OVS_NO_RETURN static void usage(void); +OVS_NO_RETURN static void usage(struct ctl_context *); static void parse_options(int argc, char *argv[], struct shash *local_options); static void run_prerequisites(struct ctl_command[], size_t n_commands, struct ovsdb_idl *); @@ -292,7 +292,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) break; case 'h': - usage(); + usage(NULL); case OPT_COMMANDS: ctl_print_commands(); @@ -350,7 +350,7 @@ parse_options(int argc, char *argv[], struct shash *local_options) } static void -usage(void) +usage(struct ctl_context *ctx OVS_UNUSED) { printf("\ %s: ovs-vswitchd management utility\n\ @@ -2701,6 +2701,7 @@ vsctl_exit(int status) static const struct ctl_command_syntax vsctl_commands[] = { /* Open vSwitch commands. */ {"init", 0, 0, "", NULL, cmd_init, NULL, "", RW}, + {"help", 0, 0, "", NULL, usage, NULL, "", RO}, /* Bridge commands. */ {"add-br", 1, 3, "NEW-BRIDGE [PARENT] [NEW-VLAN]", pre_get_info, -- 2.6.1.133.gf5b6079 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev