aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-11-25 14:38:09 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2011-12-06 11:40:01 -0200
commitd72f326431e280a619a0fd55e27d3737747f8178 (patch)
tree14ae3162f13447b2a702974d9df5f830a538ff67 /hmp.c
parenta4dea8a9f4e0a4a863e5f3b366350fd697552d8a (diff)
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 <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 3893d59cf6..e9d171124a 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);
+ }
+}