X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fcolumn.c;h=58fff1084fd9ae1b8b1bf86ea49a91d86af9f1b7;hb=a3d573ed9b510289254b29cd3a62ed51e14c5b98;hp=0a1f6e4d9fbd612cfc4e0ae1c92d1653d1441f86;hpb=c69ee87c10818267f991236201150b1fa51ae519;p=openvswitch diff --git a/ovsdb/column.c b/ovsdb/column.c index 0a1f6e4d..58fff108 100644 --- a/ovsdb/column.c +++ b/ovsdb/column.c @@ -31,6 +31,7 @@ ovsdb_column_create(const char *name, const char *comment, bool mutable, bool persistent, const struct ovsdb_type *type) { + /* Doesn't set the new column's 'index': the caller must do that. */ struct ovsdb_column *column; column = xzalloc(sizeof *column); @@ -43,6 +44,15 @@ ovsdb_column_create(const char *name, const char *comment, return column; } +struct ovsdb_column * +ovsdb_column_clone(const struct ovsdb_column *old) +{ + /* Doesn't copy the column's 'index': the caller must do that. */ + return ovsdb_column_create(old->name, old->comment, + old->mutable, old->persistent, + &old->type); +} + void ovsdb_column_destroy(struct ovsdb_column *column) {