summaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb-tool.c
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2015-03-16 12:01:55 -0400
committerBen Pfaff <blp@nicira.com>2015-03-16 13:42:52 -0700
commit5f38375100dd1001c60b31aeb519d15b3b342d1b (patch)
tree5e3d16beaca5dfa317a918e3624b18a6b143d44f /ovsdb/ovsdb-tool.c
parent9e0fa1f23861fc917b5b56bbee6864ba7f1b8756 (diff)
downloadopenvswitch-5f38375100dd1001c60b31aeb519d15b3b342d1b.tar.gz
command-line: add ovs_cmdl_ prefix
The coding style guidelines include the following: - Pick a unique name prefix (ending with an underscore) for each module, and apply that prefix to all of that module's externally visible names. Names of macro parameters, struct and union members, and parameters in function prototypes are not considered externally visible for this purpose. This patch adds the new prefix to the externally visible names. This makes it a bit more obvious what code is coming from common command line handling code. Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb/ovsdb-tool.c')
-rw-r--r--ovsdb/ovsdb-tool.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index 171166518..f6487070c 100644
--- a/ovsdb/ovsdb-tool.c
+++ b/ovsdb/ovsdb-tool.c
@@ -44,7 +44,7 @@
/* -m, --more: Verbosity level for "show-log" command output. */
static int show_log_verbosity;
-static const struct command *get_all_commands(void);
+static const struct ovs_cmdl_command *get_all_commands(void);
OVS_NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
@@ -58,7 +58,7 @@ main(int argc, char *argv[])
set_program_name(argv[0]);
parse_options(argc, argv);
fatal_ignore_sigpipe();
- run_command(argc - optind, argv + optind, get_all_commands());
+ ovs_cmdl_run_command(argc - optind, argv + optind, get_all_commands());
return 0;
}
@@ -73,7 +73,7 @@ parse_options(int argc, char *argv[])
{"version", no_argument, NULL, 'V'},
{NULL, 0, NULL, 0},
};
- char *short_options = long_options_to_short_options(long_options);
+ char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
for (;;) {
int c;
@@ -92,7 +92,7 @@ parse_options(int argc, char *argv[])
usage();
case 'o':
- print_options(long_options);
+ ovs_cmdl_print_options(long_options);
exit(EXIT_SUCCESS);
case 'V':
@@ -566,10 +566,10 @@ do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
static void
do_list_commands(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
- print_commands(get_all_commands());
+ ovs_cmdl_print_commands(get_all_commands());
}
-static const struct command all_commands[] = {
+static const struct ovs_cmdl_command all_commands[] = {
{ "create", "[db [schema]]", 0, 2, do_create },
{ "compact", "[db [dst]]", 0, 2, do_compact },
{ "convert", "[db [schema [dst]]]", 0, 3, do_convert },
@@ -586,7 +586,7 @@ static const struct command all_commands[] = {
{ NULL, NULL, 0, 0, NULL },
};
-static const struct command *get_all_commands(void)
+static const struct ovs_cmdl_command *get_all_commands(void)
{
return all_commands;
}