struct ovsdb_idl_txn *the_idl_txn;
static struct shash all_commands = SHASH_INITIALIZER(&all_commands);
+static const struct ctl_table_class *get_table(const char *table_name);
+static void set_column(const struct ctl_table_class *,
+ const struct ovsdb_idl_row *, const char *,
+ struct ovsdb_symbol_table *);
\f
static struct option *
/* Finds and returns the "struct ctl_table_class *" with 'table_name' by
* searching the 'tables'. */
-const struct ctl_table_class *
+static const struct ctl_table_class *
get_table(const char *table_name)
{
const struct ctl_table_class *table;
}
/* Sets the column of 'row' in 'table'. */
-void
+static void
set_column(const struct ctl_table_class *table,
const struct ovsdb_idl_row *row, const char *arg,
struct ovsdb_symbol_table *symtab)
free(key_string);
free(value_string);
}
+
+void ctl_set_column(const char *table_name,
+ const struct ovsdb_idl_row *row, const char *arg,
+ struct ovsdb_symbol_table *symtab)
+{
+ set_column(get_table(table_name), row, arg, symtab);
+}
* entry. */
extern const struct ctl_table_class tables[];
-const struct ctl_table_class *get_table(const char *table_name);
-void set_column(const struct ctl_table_class *,
- const struct ovsdb_idl_row *, const char *arg,
- struct ovsdb_symbol_table *);
+void ctl_set_column(const char *table_name,
+ const struct ovsdb_idl_row *, const char *arg,
+ struct ovsdb_symbol_table *);
#endif /* db-ctl-base.h */
}
for (i = 0; i < n_settings; i++) {
- set_column(get_table("Port"), &port->header_, settings[i],
- ctx->symtab);
+ ctl_set_column("Port", &port->header_, settings[i],
+ ctx->symtab);
}
bridge_insert_port((bridge->parent ? bridge->parent->br_cfg