}
static void
-check_mutable(const struct vsctl_table_class *table,
+check_mutable(const struct ovsdb_idl_row *row,
const struct ovsdb_idl_column *column)
{
- if (!column->mutable) {
+ if (!ovsdb_idl_is_mutable(row, column)) {
vsctl_fatal("cannot modify read-only column %s in table %s",
- column->name, table->class->name);
+ column->name, row->table->class->name);
}
}
table = pre_get_table(ctx, table_name);
for (i = 3; i < ctx->argc; i++) {
- const struct ovsdb_idl_column *column;
-
- column = pre_parse_column_key_value(ctx, ctx->argv[i], table);
- check_mutable(table, column);
+ pre_parse_column_key_value(ctx, ctx->argv[i], table);
}
}
if (!value_string) {
vsctl_fatal("%s: missing value", arg);
}
+ check_mutable(row, column);
if (key_string) {
union ovsdb_atom key, value;
table = pre_get_table(ctx, table_name);
pre_get_column(ctx, table, column_name, &column);
- check_mutable(table, column);
}
static void
if (!row) {
return;
}
+ check_mutable(row, column);
type = &column->type;
ovsdb_datum_clone(&old, ovsdb_idl_read(row, column), &column->type);
table = pre_get_table(ctx, table_name);
pre_get_column(ctx, table, column_name, &column);
- check_mutable(table, column);
}
static void
if (!row) {
return;
}
+ check_mutable(row, column);
type = &column->type;
ovsdb_datum_clone(&old, ovsdb_idl_read(row, column), &column->type);
const struct ovsdb_idl_column *column;
pre_get_column(ctx, table, ctx->argv[i], &column);
- check_mutable(table, column);
}
}
struct ovsdb_datum datum;
die_if_error(get_column(table, ctx->argv[i], &column));
+ check_mutable(row, column);
type = &column->type;
if (type->n_min > 0) {