Commit ec691c804f66ee99dc24a6cfe4467a56982f9115
1 parent
b0a7b120
qemu: move drives_opt for external use (Marcelo Tosatti)
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
Showing
2 changed files
with
11 additions
and
6 deletions
sysemu.h
... | ... | @@ -154,6 +154,15 @@ extern void drive_remove(int index); |
154 | 154 | extern const char *drive_get_serial(BlockDriverState *bdrv); |
155 | 155 | extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv); |
156 | 156 | |
157 | +struct drive_opt { | |
158 | + const char *file; | |
159 | + char opt[1024]; | |
160 | + int used; | |
161 | +}; | |
162 | + | |
163 | +extern struct drive_opt drives_opt[MAX_DRIVES]; | |
164 | +extern int nb_drives_opt; | |
165 | + | |
157 | 166 | /* serial ports */ |
158 | 167 | |
159 | 168 | #define MAX_SERIAL_PORTS 4 | ... | ... |
vl.c
... | ... | @@ -242,12 +242,8 @@ int alt_grab = 0; |
242 | 242 | unsigned int nb_prom_envs = 0; |
243 | 243 | const char *prom_envs[MAX_PROM_ENVS]; |
244 | 244 | #endif |
245 | -static int nb_drives_opt; | |
246 | -static struct drive_opt { | |
247 | - const char *file; | |
248 | - char opt[1024]; | |
249 | - int used; | |
250 | -} drives_opt[MAX_DRIVES]; | |
245 | +int nb_drives_opt; | |
246 | +struct drive_opt drives_opt[MAX_DRIVES]; | |
251 | 247 | |
252 | 248 | static CPUState *cur_cpu; |
253 | 249 | static CPUState *next_cpu; | ... | ... |