From d72f326431e280a619a0fd55e27d3737747f8178 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 25 Nov 2011 14:38:09 -0200 Subject: qapi: Convert balloon Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC API, but the new command is a regular synchronous command. There shouldn't be visible differences though, as MONITOR_CMD_ASYNC is internal only. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index 3893d59cf..e9d171124 100644 --- a/hmp.c +++ b/hmp.c @@ -621,3 +621,15 @@ void hmp_block_passwd(Monitor *mon, const QDict *qdict) qmp_block_passwd(device, password, &errp); hmp_handle_error(mon, &errp); } + +void hmp_balloon(Monitor *mon, const QDict *qdict) +{ + int64_t value = qdict_get_int(qdict, "value"); + Error *errp = NULL; + + qmp_balloon(value, &errp); + if (error_is_set(&errp)) { + monitor_printf(mon, "balloon: %s\n", error_get_pretty(errp)); + error_free(errp); + } +} -- cgit v1.2.3-65-gdbad