X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ovsdb%2Fovsdb-client.c;h=67d09cbdc209908b6b83830b27c8c3608532ddfd;hb=fa04edcedfe5285fd8ad3a4d70fecb38df18293d;hp=81dcc779b171aedd6d362eb9f77a8046f9fa2d5f;hpb=66980be97d99fa80de77e495bd0b7b4ad5079148;p=sliver-openvswitch.git diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 81dcc779b..67d09cbdc 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -69,7 +69,7 @@ static bool timestamp; /* Format for table output. */ static struct table_style table_style = TABLE_STYLE_DEFAULT; -static const struct ovsdb_client_command all_commands[]; +static const struct ovsdb_client_command *get_all_commands(void); static void usage(void) NO_RETURN; static void parse_options(int argc, char *argv[]); @@ -92,7 +92,7 @@ main(int argc, char *argv[]) ovs_fatal(0, "missing command name; use --help for help"); } - for (command = all_commands; ; command++) { + for (command = get_all_commands(); ; command++) { if (!command->name) { VLOG_FATAL("unknown command '%s'; use --help for help", argv[optind]); @@ -392,7 +392,7 @@ fetch_dbs(struct jsonrpc *rpc, struct svec *dbs) svec_add(dbs, name->u.string); } jsonrpc_msg_destroy(reply); - svec_sort(&dbs); + svec_sort(dbs); } static void @@ -997,3 +997,8 @@ static const struct ovsdb_client_command all_commands[] = { { NULL, 0, 0, 0, NULL }, }; + +static const struct ovsdb_client_command *get_all_commands(void) +{ + return all_commands; +}