-/* Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
+/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
unsigned long changed[]; /* Bits set to 1 for columns that changed. */
};
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
delete_garbage_row(struct ovsdb_txn *txn, struct ovsdb_txn_row *r);
static void ovsdb_txn_row_prefree(struct ovsdb_txn_row *);
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
for_each_txn_row(struct ovsdb_txn *txn,
struct ovsdb_error *(*)(struct ovsdb_txn *,
struct ovsdb_txn_row *));
return txn_row;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
ovsdb_txn_adjust_atom_refs(struct ovsdb_txn *txn, const struct ovsdb_row *r,
const struct ovsdb_column *c,
const struct ovsdb_base_type *base,
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
ovsdb_txn_adjust_row_refs(struct ovsdb_txn *txn, const struct ovsdb_row *r,
const struct ovsdb_column *column, int delta)
{
return error;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
update_row_ref_count(struct ovsdb_txn *txn, struct ovsdb_txn_row *r)
{
struct ovsdb_table *table = r->table;
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
check_ref_count(struct ovsdb_txn *txn OVS_UNUSED, struct ovsdb_txn_row *r)
{
if (r->new || !r->n_refs) {
} else {
return ovsdb_error("referential integrity violation",
"cannot delete %s row "UUID_FMT" because "
- "of %zu remaining reference(s)",
+ "of %"PRIuSIZE" remaining reference(s)",
r->table->schema->name, UUID_ARGS(&r->uuid),
r->n_refs);
}
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
delete_row_refs(struct ovsdb_txn *txn, const struct ovsdb_row *row,
const struct ovsdb_base_type *base,
const union ovsdb_atom *atoms, unsigned int n)
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
delete_garbage_row(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
{
struct shash_node *node;
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
collect_garbage(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
{
if (txn_row->new && !txn_row->n_refs) {
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
update_ref_counts(struct ovsdb_txn *txn)
{
struct ovsdb_error *error;
list_push_back(&src->src_refs, &weak->src_node);
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
assess_weak_refs(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
{
struct ovsdb_table *table;
}
if (datum->n != orig_n) {
+ bitmap_set1(txn_row->changed, OVSDB_COL_VERSION);
bitmap_set1(txn_row->changed, column->index);
ovsdb_datum_sort_assert(datum, column->type.key.type);
if (datum->n < column->type.n_min) {
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
determine_changes(struct ovsdb_txn *txn, struct ovsdb_txn_row *txn_row)
{
struct ovsdb_table *table = txn_row->table;
return NULL;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
check_max_rows(struct ovsdb_txn *txn)
{
struct ovsdb_txn_table *t;
if (n_rows > max_rows) {
return ovsdb_error("constraint violation",
"transaction causes \"%s\" table to contain "
- "%zu rows, greater than the schema-defined "
+ "%"PRIuSIZE" rows, greater than the schema-defined "
"limit of %u row(s)",
t->table->schema->name, n_rows, max_rows);
}
ds_put_format(out, "%s row, with UUID "UUID_FMT", ",
title, UUID_ARGS(ovsdb_row_get_uuid(row)));
if (!row->txn_row
- || bitmap_scan(row->txn_row->changed, 0, n_columns) == n_columns) {
+ || bitmap_scan(row->txn_row->changed, 1, 0, n_columns) == n_columns) {
ds_put_cstr(out, "existed in the database before this "
"transaction and was not modified by the transaction.");
} else if (!row->txn_row->old) {
}
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
duplicate_index_row(const struct ovsdb_column_set *index,
const struct ovsdb_row *a,
const struct ovsdb_row *b)
return error;
}
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
check_index_uniqueness(struct ovsdb_txn *txn OVS_UNUSED,
struct ovsdb_txn_row *txn_row)
{
* (Even though 'cb' is not allowed to delete some txn_rows, it can still
* delete any actual row by clearing a txn_row's 'new' member.)
*/
-static struct ovsdb_error * WARN_UNUSED_RESULT
+static struct ovsdb_error * OVS_WARN_UNUSED_RESULT
for_each_txn_row(struct ovsdb_txn *txn,
struct ovsdb_error *(*cb)(struct ovsdb_txn *,
struct ovsdb_txn_row *))