aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-12-20 23:21:09 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2014-01-06 13:45:47 -0500
commitab2d0531b2e41bc5fd8f8e59405f135986599476 (patch)
treef40c89a272948494054e57f8096253a5f50a0bd4 /hmp.c
parentb0ed5e9feaf0e2881330a48c692f62e1ac6d9052 (diff)
downloadqemu-arm-ab2d0531b2e41bc5fd8f8e59405f135986599476.tar.gz
monitor: add object-del (QMP) and object_del (HMP) command
These two commands invoke the "unparent" method of Object. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index c513f9b685..fe05c6b860 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1574,3 +1574,12 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
hmp_handle_error(mon, &err);
}
+
+void hmp_object_del(Monitor *mon, const QDict *qdict)
+{
+ const char *id = qdict_get_str(qdict, "id");
+ Error *err = NULL;
+
+ qmp_object_del(id, &err);
+ hmp_handle_error(mon, &err);
+}