From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUi4t-0002mt-G1 for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:46:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUi4s-0002ma-UV for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:46:07 -0500 Received: from [199.232.76.173] (port=37313 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUi4s-0002mU-Mr for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:46:06 -0500 Received: from mx2.redhat.com ([66.187.237.31]:34132) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUi4s-0000e9-60 for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:46:06 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n14Dk5Nn010641 for ; Wed, 4 Feb 2009 08:46:05 -0500 Message-Id: <20090204133923.804708932@localhost.localdomain> References: <20090204133303.113145633@localhost.localdomain> Date: Wed, 04 Feb 2009 11:33:10 -0200 From: Marcelo Tosatti Content-Disposition: inline; filename=move-drives-opt-for-external-use Subject: [Qemu-devel] [patch 07/18] qemu: 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 Cc: Marcelo Tosatti Device hotplug will use that structure from a separate file. Signed-off-by: Marcelo Tosatti Index: trunk/sysemu.h =================================================================== --- trunk.orig/sysemu.h +++ trunk/sysemu.h @@ -154,6 +154,15 @@ extern void drive_remove(int index); extern const char *drive_get_serial(BlockDriverState *bdrv); extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv); +struct drive_opt { + const char *file; + char opt[1024]; + int used; +}; + +extern struct drive_opt drives_opt[MAX_DRIVES]; +extern int nb_drives_opt; + /* serial ports */ #define MAX_SERIAL_PORTS 4 Index: trunk/vl.c =================================================================== --- trunk.orig/vl.c +++ trunk/vl.c @@ -242,12 +242,8 @@ int alt_grab = 0; unsigned int nb_prom_envs = 0; const char *prom_envs[MAX_PROM_ENVS]; #endif -static int nb_drives_opt; -static struct drive_opt { - const char *file; - char opt[1024]; - int used; -} drives_opt[MAX_DRIVES]; +int nb_drives_opt; +struct drive_opt drives_opt[MAX_DRIVES]; static CPUState *cur_cpu; static CPUState *next_cpu; --