From patchwork Wed May 19 16:02:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 52990 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 8AB85B7D49 for ; Thu, 20 May 2010 02:09:26 +1000 (EST) Received: from localhost ([127.0.0.1]:33193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OElpi-0007BB-Gr for incoming@patchwork.ozlabs.org; Wed, 19 May 2010 12:09:22 -0400 Received: from [140.186.70.92] (port=49585 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEljv-0003sE-4W for qemu-devel@nongnu.org; Wed, 19 May 2010 12:03:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEljt-0005U0-3d for qemu-devel@nongnu.org; Wed, 19 May 2010 12:03:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58320) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEljs-0005Ts-SM for qemu-devel@nongnu.org; Wed, 19 May 2010 12:03:21 -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 o4JG3KnT011433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 May 2010 12:03:20 -0400 Received: from localhost (vpn-8-1.rdu.redhat.com [10.11.8.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JG3IW1008824; Wed, 19 May 2010 12:03:19 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Wed, 19 May 2010 13:02:58 -0300 Message-Id: <1274284982-15125-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1274284982-15125-1-git-send-email-lcapitulino@redhat.com> References: <1274284982-15125-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org, Markus Armbruster Subject: [Qemu-devel] [PATCH 3/7] Revert "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 From: Markus Armbruster We don't want pci_del in QMP. Use device_del instead. This reverts commit 6848d827162fea039f2658414a4adb6164a4f9b0. Conflicts: hw/pci-hotplug.c sysemu.h Signed-off-by: Markus Armbruster --- hw/pci-hotplug.c | 5 ++--- qemu-monitor.hx | 3 +-- sysemu.h | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 22a7ce4..37ac015 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -277,8 +277,7 @@ int pci_device_hot_remove(Monitor *mon, const char *pci_addr) return qdev_unplug(&d->qdev); } -int do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, - QObject **ret_data) +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict) { - return pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); + pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); } diff --git a/qemu-monitor.hx b/qemu-monitor.hx index fba4c3f..b6e3467 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -874,8 +874,7 @@ ETEXI .args_type = "pci_addr:s", .params = "[[:]:]", .help = "hot remove PCI device", - .user_print = monitor_user_noop, - .mhandler.cmd_new = do_pci_device_hot_remove, + .mhandler.cmd = do_pci_device_hot_remove, }, #endif diff --git a/sysemu.h b/sysemu.h index 47975b5..643c0c6 100644 --- a/sysemu.h +++ b/sysemu.h @@ -204,8 +204,7 @@ DriveInfo *add_init_drive(const char *opts); void pci_device_hot_add(Monitor *mon, const QDict *qdict); void drive_hot_add(Monitor *mon, const QDict *qdict); int pci_device_hot_remove(Monitor *mon, const char *pci_addr); -int do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, - QObject **ret_data); +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); /* serial ports */