diff options
author | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:03:21 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-02-08 16:03:21 -0800 |
commit | fbf925e45da7100e5018bd3ad49532e407666f77 (patch) | |
tree | 7968811ea6fee06c9258e98f383346996998d1ac /lib/ovsdb-data.h | |
parent | bfe8e67ad595348f228938663956c3b8325997c5 (diff) |
ovsdb: Get rid of "declare" operation.
It's more elegant, and just as easy to implement, if we allow a
"named-uuid" to be a forward reference to a "uuid-name" in a later
"insert" operation.
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r-- | lib/ovsdb-data.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index c8e146a7..063536b2 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -69,7 +69,7 @@ static inline bool ovsdb_atom_equals(const union ovsdb_atom *a, struct ovsdb_error *ovsdb_atom_from_json(union ovsdb_atom *, const struct ovsdb_base_type *, const struct json *, - const struct ovsdb_symbol_table *) + struct ovsdb_symbol_table *) WARN_UNUSED_RESULT; struct json *ovsdb_atom_to_json(const union ovsdb_atom *, enum ovsdb_atomic_type); @@ -131,7 +131,7 @@ struct ovsdb_error *ovsdb_datum_check_constraints( struct ovsdb_error *ovsdb_datum_from_json(struct ovsdb_datum *, const struct ovsdb_type *, const struct json *, - const struct ovsdb_symbol_table *) + struct ovsdb_symbol_table *) WARN_UNUSED_RESULT; struct json *ovsdb_datum_to_json(const struct ovsdb_datum *, const struct ovsdb_type *); @@ -206,8 +206,11 @@ struct ovsdb_symbol_table *ovsdb_symbol_table_create(void); void ovsdb_symbol_table_destroy(struct ovsdb_symbol_table *); struct ovsdb_symbol *ovsdb_symbol_table_get(const struct ovsdb_symbol_table *, const char *name); -void ovsdb_symbol_table_put(struct ovsdb_symbol_table *, const char *name, - const struct uuid *, bool used); +struct ovsdb_symbol *ovsdb_symbol_table_put(struct ovsdb_symbol_table *, + const char *name, + const struct uuid *, bool used); +struct ovsdb_symbol *ovsdb_symbol_table_insert(struct ovsdb_symbol_table *, + const char *name); /* Tokenization * |