From ab2d0531b2e41bc5fd8f8e59405f135986599476 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Dec 2013 23:21:09 +0100 Subject: monitor: add object-del (QMP) and object_del (HMP) command These two commands invoke the "unparent" method of Object. Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- hmp.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hmp.c') 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); +} -- cgit v1.2.1