From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZAti-0007al-FK for qemu-devel@nongnu.org; Tue, 11 Mar 2008 16:16:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZAth-0007Zw-U0 for qemu-devel@nongnu.org; Tue, 11 Mar 2008 16:16:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZAth-0007Zl-No for qemu-devel@nongnu.org; Tue, 11 Mar 2008 16:16:29 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JZAth-00046r-G9 for qemu-devel@nongnu.org; Tue, 11 Mar 2008 16:16:29 -0400 Message-Id: <20080311201418.004229705@localhost.localdomain> References: <20080311201151.959635433@localhost.localdomain> Date: Tue, 11 Mar 2008 17:12:01 -0300 From: Marcelo Tosatti Content-Disposition: inline; filename=drive_opt Subject: [Qemu-devel] [patch 10/24] QEMU/KVM: move drives_opt for external use Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kvm-devel@lists.sourceforge.net Cc: aliguori@us.ibm.com, Marcelo Tosatti Device hotplug will use that structure from a separate file. Signed-off-by: Marcelo Tosatti Index: kvm-userspace.hotplug2/qemu/sysemu.h =================================================================== --- kvm-userspace.hotplug2.orig/qemu/sysemu.h +++ kvm-userspace.hotplug2/qemu/sysemu.h @@ -157,6 +157,15 @@ extern int drive_get_max_bus(BlockInterf extern void drive_uninit(BlockDriverState *bdrv); extern void drive_remove(int index); +struct drive_opt { + const char *file; + char opt[1024]; + int used; +}; + +extern struct drive_opt drives_opt[MAX_DRIVES]; +extern int nb_drives_opt; + /* acpi */ void qemu_system_cpu_hot_add(int cpu, int state); void qemu_system_hot_add_init(char *cpu_model); Index: kvm-userspace.hotplug2/qemu/vl.c =================================================================== --- kvm-userspace.hotplug2.orig/qemu/vl.c +++ kvm-userspace.hotplug2/qemu/vl.c @@ -251,11 +251,7 @@ unsigned int nb_prom_envs = 0; const char *prom_envs[MAX_PROM_ENVS]; #endif int nb_drives_opt; -struct drive_opt { - const char *file; - char opt[1024]; - int used; -} drives_opt[MAX_DRIVES]; +struct drive_opt drives_opt[MAX_DRIVES]; static CPUState *cur_cpu; static CPUState *next_cpu; --