diff options
author | Jakub Sitnicki <jkbs@redhat.com> | 2018-07-02 12:50:18 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-03 13:19:59 -0700 |
commit | d0adfd7756ddc627c569957febe0fdf529dc7414 (patch) | |
tree | a939106fa9ca6fab0cff776e5a58db8467f90ff3 /lib | |
parent | 1c4f051bee956637266cb5fbaf2aaacc36ca28d5 (diff) | |
download | openvswitch-d0adfd7756ddc627c569957febe0fdf529dc7414.tar.gz |
db-ctl-base: Don't die in cmd_clear() on error.
Return the error via the context instead of calling ctl_fatal() so that
the caller can decide how to handle it.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db-ctl-base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index 41891c42b..ef35ee98c 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -1661,9 +1661,10 @@ cmd_clear(struct ctl_context *ctx) type = &column->type; if (type->n_min > 0) { - ctl_fatal("\"clear\" operation cannot be applied to column %s " - "of table %s, which is not allowed to be empty", + ctl_error(ctx, "\"clear\" operation cannot be applied to column " + "%s of table %s, which is not allowed to be empty", column->name, table->name); + return; } ovsdb_datum_init_empty(&datum); |