X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fexecution.c;h=4cb8b14c4a46193bdbe9bf6195abc8e8cfba0b33;hb=d3a8012b60ecb89b0a65f14b128b5a7d7ca1a2a5;hp=67f6b8d0611ab213b86980217d55ff30ef16f437;hpb=e9f8f9367e9e654b9582279608af86ea3744a2a0;p=openvswitch diff --git a/ovsdb/execution.c b/ovsdb/execution.c index 67f6b8d0..4cb8b14c 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -57,6 +57,7 @@ static ovsdb_operation_executor ovsdb_execute_wait; static ovsdb_operation_executor ovsdb_execute_commit; static ovsdb_operation_executor ovsdb_execute_abort; static ovsdb_operation_executor ovsdb_execute_declare; +static ovsdb_operation_executor ovsdb_execute_comment; static ovsdb_operation_executor * lookup_executor(const char *name) @@ -76,6 +77,7 @@ lookup_executor(const char *name) { "commit", ovsdb_execute_commit }, { "abort", ovsdb_execute_abort }, { "declare", ovsdb_execute_declare }, + { "comment", ovsdb_execute_comment }, }; size_t i; @@ -685,3 +687,18 @@ ovsdb_execute_declare(struct ovsdb_execution *x, struct ovsdb_parser *parser, xasprintf(UUID_FMT, UUID_ARGS(&uuid)))); return NULL; } + +static struct ovsdb_error * +ovsdb_execute_comment(struct ovsdb_execution *x, struct ovsdb_parser *parser, + struct json *result UNUSED) +{ + const struct json *comment; + + comment = ovsdb_parser_member(parser, "comment", OP_STRING); + if (!comment) { + return NULL; + } + ovsdb_txn_add_comment(x->txn, json_string(comment)); + + return NULL; +}