diff options
author | Ben Pfaff <blp@nicira.com> | 2010-01-11 13:14:54 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-11 13:14:54 -0800 |
commit | c532bf9dd4e684bc583debc9618e3210334f8081 (patch) | |
tree | bbd64fe072c4b1458ee6e69c61607b45f7bac381 /lib/ovsdb-data.h | |
parent | 80d326ad2a08995300aa02aaae2087fcd96694f4 (diff) |
ovsdb: Save some space in the log for newly inserted records.
When a new record is inserted into a database, ovsdb logs the values of all
of the fields in the record. However, often new records have many columns
that contain default values. There is no need to log those values, so this
commit causes them to be omitted.
As a side effect, this also makes "ovsdb-tool show-log --more --more"
output easier to read, because record insertions print less noise. (Adding
--more --more to this command makes it print changes to database records.
The --more option will be introduced in an upcoming commit.)
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r-- | lib/ovsdb-data.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index 3f2d4894..18b8841c 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009 Nicira Networks +/* Copyright (c) 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ union ovsdb_atom { }; void ovsdb_atom_init_default(union ovsdb_atom *, enum ovsdb_atomic_type); +bool ovsdb_atom_is_default(const union ovsdb_atom *, enum ovsdb_atomic_type); void ovsdb_atom_clone(union ovsdb_atom *, const union ovsdb_atom *, enum ovsdb_atomic_type); void ovsdb_atom_swap(union ovsdb_atom *, union ovsdb_atom *); @@ -80,6 +81,8 @@ struct ovsdb_datum { }; void ovsdb_datum_init_default(struct ovsdb_datum *, const struct ovsdb_type *); +bool ovsdb_datum_is_default(const struct ovsdb_datum *, + const struct ovsdb_type *); void ovsdb_datum_clone(struct ovsdb_datum *, const struct ovsdb_datum *, const struct ovsdb_type *); void ovsdb_datum_destroy(struct ovsdb_datum *, const struct ovsdb_type *); |