From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrGhJ-0006Wl-6s for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrGhC-0006S9-LO for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:15 -0400 Received: from [199.232.76.173] (port=56056 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrGhC-0006Ry-I2 for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61125) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrGhC-0004fI-3Q for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:10 -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 n8PJh9hw002523 for ; Fri, 25 Sep 2009 15:43:09 -0400 From: Gerd Hoffmann Date: Fri, 25 Sep 2009 21:42:48 +0200 Message-Id: <1253907769-1067-24-git-send-email-kraxel@redhat.com> In-Reply-To: <1253907769-1067-1-git-send-email-kraxel@redhat.com> References: <1253907769-1067-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 23/24] allow if=none for drive_add List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Allow adding unconnected host drives by specifying if=none like it is possible with -drive. They can be put in use with drive attributes, like this: drive_add dummy if=none,id=mydisk,file=/some/disk.img device_add virtio-blk-pci,drive=mydisk which is the monitor aequivalent to these command line switches: -drive if=none,id=mydisk,file=/some/disk.img -device virtio-blk-pci,drive=mydisk Signed-off-by: Gerd Hoffmann --- hw/pci-hotplug.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 562b6b8..3924419 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -87,6 +87,9 @@ void drive_hot_add(Monitor *mon, const QDict *qdict) dinfo->bus, dinfo->unit); break; + case IF_NONE: + monitor_printf(mon, "OK\n"); + break; default: monitor_printf(mon, "Can't hot-add drive to type %d\n", type); goto err; -- 1.6.2.5