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
parentqapi: Convert block_passwd (diff)
downloadqemu-kvm-d72f326431e280a619a0fd55e27d3737747f8178.tar.gz
qemu-kvm-d72f326431e280a619a0fd55e27d3737747f8178.tar.bz2
qemu-kvm-d72f326431e280a619a0fd55e27d3737747f8178.zip
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 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);
+ }
+}