2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovsdb-data: Rename 'used' to 'created' in struct ovsdb_symbol.

The name 'created' better reflects the actual meaning of this member: in
both ovsdb and ovs-vsctl, it is true if a row has been created with the
symbol's UUID and false otherwise.
This commit is contained in:
Ben Pfaff
2011-02-28 12:43:15 -08:00
parent 71abd20a17
commit e9387de4a2
4 changed files with 15 additions and 14 deletions

View File

@@ -1825,14 +1825,14 @@ ovsdb_symbol_table_get(const struct ovsdb_symbol_table *symtab,
struct ovsdb_symbol *
ovsdb_symbol_table_put(struct ovsdb_symbol_table *symtab, const char *name,
const struct uuid *uuid, bool used)
const struct uuid *uuid, bool created)
{
struct ovsdb_symbol *symbol;
assert(!ovsdb_symbol_table_get(symtab, name));
symbol = xmalloc(sizeof *symbol);
symbol->uuid = *uuid;
symbol->used = used;
symbol->created = created;
shash_add(&symtab->sh, name, symbol);
return symbol;
}
@@ -1854,13 +1854,13 @@ ovsdb_symbol_table_insert(struct ovsdb_symbol_table *symtab,
}
const char *
ovsdb_symbol_table_find_unused(const struct ovsdb_symbol_table *symtab)
ovsdb_symbol_table_find_uncreated(const struct ovsdb_symbol_table *symtab)
{
struct shash_node *node;
SHASH_FOR_EACH (node, &symtab->sh) {
struct ovsdb_symbol *symbol = node->data;
if (!symbol->used) {
if (!symbol->created) {
return node->name;
}
}