From patchwork Thu Oct 8 21:35:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 35540 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4707AB7B65 for ; Fri, 9 Oct 2009 09:09:00 +1100 (EST) Received: from localhost ([127.0.0.1]:55307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw1AO-0002Yt-M1 for incoming@patchwork.ozlabs.org; Thu, 08 Oct 2009 18:08:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw0f2-0001SB-Cl for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:36:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw0ew-0001Ls-H1 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:36:31 -0400 Received: from [199.232.76.173] (port=34354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw0ev-0001L1-2d for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:36:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63163) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw0eu-00031c-E8 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:36:24 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n98LaNp3022512; Thu, 8 Oct 2009 17:36:23 -0400 Received: from localhost (vpn-13-37.rdu.redhat.com [10.11.13.37]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n98LaMpt017205; Thu, 8 Oct 2009 17:36:23 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Thu, 8 Oct 2009 18:35:47 -0300 Message-Id: <1255037747-3340-11-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1255037747-3340-1-git-send-email-lcapitulino@redhat.com> References: <1255037747-3340-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 10/10] monitor: Convert do_pci_device_hot_remove() to QObject X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors are still directly printed, as we are only converting regular output. Signed-off-by: Luiz Capitulino --- hw/pci-hotplug.c | 3 ++- qemu-monitor.hx | 3 ++- sysemu.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 3234265..ce06573 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -262,7 +262,8 @@ void pci_device_hot_remove(Monitor *mon, const char *pci_addr) qdev_unplug(&d->qdev); } -void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict) +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, + QObject **ret_data) { pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); } diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 37dc863..1c5879a 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -817,7 +817,8 @@ ETEXI .args_type = "pci_addr:s", .params = "[[:]:]", .help = "hot remove PCI device", - .mhandler.cmd = do_pci_device_hot_remove, + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_pci_device_hot_remove, }, #endif diff --git a/sysemu.h b/sysemu.h index 17b91c4..896916f 100644 --- a/sysemu.h +++ b/sysemu.h @@ -212,7 +212,8 @@ void pci_add_user_print(Monitor *mon, const QObject *data); void pci_device_hot_add(Monitor *mon, const QDict *qdict, QObject **ret_data); void drive_hot_add(Monitor *mon, const QDict *qdict); void pci_device_hot_remove(Monitor *mon, const char *pci_addr); -void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, + QObject **ret_data); void pci_device_hot_remove_success(PCIDevice *dev); /* serial ports */