summaryrefslogtreecommitdiff
path: root/ovsdb/row.c
diff options
context:
space:
mode:
Diffstat (limited to 'ovsdb/row.c')
-rw-r--r--ovsdb/row.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ovsdb/row.c b/ovsdb/row.c
index fd50c7e7b..3f0bb8acf 100644
--- a/ovsdb/row.c
+++ b/ovsdb/row.c
@@ -155,6 +155,23 @@ ovsdb_row_clone(const struct ovsdb_row *old)
return new;
}
+struct ovsdb_row *
+ovsdb_row_datum_clone(const struct ovsdb_row *old)
+{
+ const struct ovsdb_table *table = old->table;
+ const struct shash_node *node;
+ struct ovsdb_row *new;
+
+ new = allocate_row(table);
+ SHASH_FOR_EACH (node, &table->schema->columns) {
+ const struct ovsdb_column *column = node->data;
+ ovsdb_datum_clone(&new->fields[column->index],
+ &old->fields[column->index]);
+ }
+ return new;
+}
+
+
/* The caller is responsible for ensuring that 'row' has been removed from its
* table and that it is not participating in a transaction. */
void