qemu: move drives_opt for external use (Marcelo Tosatti)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 11 Feb 2009 15:20:37 +0000 (15:20 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 11 Feb 2009 15:20:37 +0000 (15:20 +0000)
Device hotplug will use that structure from a separate
file.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6598 c046a42c-6fe2-441c-8c8c-71466251a162

sysemu.h
vl.c

index 78d70c5..9b99343 100644 (file)
--- a/sysemu.h
+++ b/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
diff --git a/vl.c b/vl.c
index 2198151..7b51b54 100644 (file)
--- a/vl.c
+++ b/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;