aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-12-07 11:17:51 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2012-01-18 10:23:38 -0200
commitfbf796fd6f855313d2c02b7d8e1a0c4241b1e0b6 (patch)
tree789cec2028477461ecfcc3b5b159b14464360aff /hmp.c
parenta6aa9d3e2681199d159963e46524625d90669619 (diff)
downloadqemu-fbf796fd6f855313d2c02b7d8e1a0c4241b1e0b6.zip
qemu-fbf796fd6f855313d2c02b7d8e1a0c4241b1e0b6.tar.gz
qemu-fbf796fd6f855313d2c02b7d8e1a0c4241b1e0b6.tar.bz2
qapi: Convert set_password
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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 8a77780..888e1b9 100644
--- a/hmp.c
+++ b/hmp.c
@@ -681,3 +681,14 @@ void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict)
int64_t value = qdict_get_int(qdict, "value");
qmp_migrate_set_speed(value, NULL);
}
+
+void hmp_set_password(Monitor *mon, const QDict *qdict)
+{
+ const char *protocol = qdict_get_str(qdict, "protocol");
+ const char *password = qdict_get_str(qdict, "password");
+ const char *connected = qdict_get_try_str(qdict, "connected");
+ Error *err = NULL;
+
+ qmp_set_password(protocol, password, !!connected, connected, &err);
+ hmp_handle_error(mon, &err);
+}