ovs-vsctl-bashcomp: Fix build failure when bash version < 4.0.
[cascardo/ovs.git] / tests / test-ovsdb.c
index ebb24c0..99f41c1 100644 (file)
@@ -49,9 +49,9 @@
 #include "tests/idltest.h"
 #include "timeval.h"
 #include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
 
-static void usage(void) NO_RETURN;
+OVS_NO_RETURN static void usage(void);
 static void parse_options(int argc, char *argv[]);
 static struct command *get_all_commands(void);
 
@@ -1508,13 +1508,13 @@ static void
 do_transact(int argc, char *argv[])
 {
     static const struct command do_transact_commands[] = {
-        { "commit", 0, 0, do_transact_commit },
-        { "abort", 0, 0, do_transact_abort },
-        { "insert", 2, 3, do_transact_insert },
-        { "delete", 1, 1, do_transact_delete },
-        { "modify", 2, 3, do_transact_modify },
-        { "print", 0, 0, do_transact_print },
-        { NULL, 0, 0, NULL },
+        { "commit", NULL, 0, 0, do_transact_commit },
+        { "abort", NULL, 0, 0, do_transact_abort },
+        { "insert", NULL, 2, 3, do_transact_insert },
+        { "delete", NULL, 1, 1, do_transact_delete },
+        { "modify", NULL, 2, 3, do_transact_modify },
+        { "print", NULL, 0, 0, do_transact_print },
+        { NULL, NULL, 0, 0, NULL },
     };
 
     struct ovsdb_schema *schema;
@@ -1963,34 +1963,34 @@ do_idl(int argc, char *argv[])
 }
 
 static struct command all_commands[] = {
-    { "log-io", 2, INT_MAX, do_log_io },
-    { "default-atoms", 0, 0, do_default_atoms },
-    { "default-data", 0, 0, do_default_data },
-    { "parse-atomic-type", 1, 1, do_parse_atomic_type },
-    { "parse-base-type", 1, 1, do_parse_base_type },
-    { "parse-type", 1, 1, do_parse_type },
-    { "parse-atoms", 2, INT_MAX, do_parse_atoms },
-    { "parse-atom-strings", 2, INT_MAX, do_parse_atom_strings },
-    { "parse-data", 2, INT_MAX, do_parse_data },
-    { "parse-data-strings", 2, INT_MAX, do_parse_data_strings },
-    { "sort-atoms", 2, 2, do_sort_atoms },
-    { "parse-column", 2, 2, do_parse_column },
-    { "parse-table", 2, 3, do_parse_table },
-    { "parse-rows", 2, INT_MAX, do_parse_rows },
-    { "compare-rows", 2, INT_MAX, do_compare_rows },
-    { "parse-conditions", 2, INT_MAX, do_parse_conditions },
-    { "evaluate-conditions", 3, 3, do_evaluate_conditions },
-    { "parse-mutations", 2, INT_MAX, do_parse_mutations },
-    { "execute-mutations", 3, 3, do_execute_mutations },
-    { "query", 3, 3, do_query },
-    { "query-distinct", 4, 4, do_query_distinct },
-    { "transact", 1, INT_MAX, do_transact },
-    { "parse-schema", 1, 1, do_parse_schema },
-    { "execute", 2, INT_MAX, do_execute },
-    { "trigger", 2, INT_MAX, do_trigger },
-    { "idl", 1, INT_MAX, do_idl },
-    { "help", 0, INT_MAX, do_help },
-    { NULL, 0, 0, NULL },
+    { "log-io", NULL, 2, INT_MAX, do_log_io },
+    { "default-atoms", NULL, 0, 0, do_default_atoms },
+    { "default-data", NULL, 0, 0, do_default_data },
+    { "parse-atomic-type", NULL, 1, 1, do_parse_atomic_type },
+    { "parse-base-type", NULL, 1, 1, do_parse_base_type },
+    { "parse-type", NULL, 1, 1, do_parse_type },
+    { "parse-atoms", NULL, 2, INT_MAX, do_parse_atoms },
+    { "parse-atom-strings", NULL, 2, INT_MAX, do_parse_atom_strings },
+    { "parse-data", NULL, 2, INT_MAX, do_parse_data },
+    { "parse-data-strings", NULL, 2, INT_MAX, do_parse_data_strings },
+    { "sort-atoms", NULL, 2, 2, do_sort_atoms },
+    { "parse-column", NULL, 2, 2, do_parse_column },
+    { "parse-table", NULL, 2, 3, do_parse_table },
+    { "parse-rows", NULL, 2, INT_MAX, do_parse_rows },
+    { "compare-rows", NULL, 2, INT_MAX, do_compare_rows },
+    { "parse-conditions", NULL, 2, INT_MAX, do_parse_conditions },
+    { "evaluate-conditions", NULL, 3, 3, do_evaluate_conditions },
+    { "parse-mutations", NULL, 2, INT_MAX, do_parse_mutations },
+    { "execute-mutations", NULL, 3, 3, do_execute_mutations },
+    { "query", NULL, 3, 3, do_query },
+    { "query-distinct", NULL, 4, 4, do_query_distinct },
+    { "transact", NULL, 1, INT_MAX, do_transact },
+    { "parse-schema", NULL, 1, 1, do_parse_schema },
+    { "execute", NULL, 2, INT_MAX, do_execute },
+    { "trigger", NULL, 2, INT_MAX, do_trigger },
+    { "idl", NULL, 1, INT_MAX, do_idl },
+    { "help", NULL, 0, INT_MAX, do_help },
+    { NULL, NULL, 0, 0, NULL },
 };
 
 static struct command *