Revision 751c6a17 sysemu.h
b/sysemu.h | ||
---|---|---|
3 | 3 |
/* Misc. things related to the system emulator. */ |
4 | 4 |
|
5 | 5 |
#include "qemu-common.h" |
6 |
#include "sys-queue.h" |
|
6 | 7 |
|
7 | 8 |
#ifdef _WIN32 |
8 | 9 |
#include <windows.h> |
... | ... | |
164 | 165 |
BlockInterfaceType type; |
165 | 166 |
int bus; |
166 | 167 |
int unit; |
167 |
int used; |
|
168 | 168 |
int drive_opt_idx; |
169 | 169 |
BlockInterfaceErrorAction onerror; |
170 | 170 |
char serial[BLOCK_SERIAL_STRLEN + 1]; |
171 |
TAILQ_ENTRY(DriveInfo) next; |
|
171 | 172 |
} DriveInfo; |
172 | 173 |
|
173 | 174 |
#define MAX_IDE_DEVS 2 |
174 | 175 |
#define MAX_SCSI_DEVS 7 |
175 | 176 |
#define MAX_DRIVES 32 |
176 | 177 |
|
177 |
extern int nb_drives; |
|
178 |
extern DriveInfo drives_table[MAX_DRIVES+1]; |
|
178 |
extern TAILQ_HEAD(drivelist, DriveInfo) drives; |
|
179 | 179 |
|
180 |
extern int drive_get_index(BlockInterfaceType type, int bus, int unit);
|
|
180 |
extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
|
|
181 | 181 |
extern int drive_get_max_bus(BlockInterfaceType type); |
182 | 182 |
extern void drive_uninit(BlockDriverState *bdrv); |
183 | 183 |
extern void drive_remove(int index); |
... | ... | |
196 | 196 |
extern int nb_drives_opt; |
197 | 197 |
|
198 | 198 |
extern int drive_add(const char *file, const char *fmt, ...); |
199 |
extern int drive_init(struct drive_opt *arg, int snapshot, void *machine); |
|
199 |
extern DriveInfo *drive_init(struct drive_opt *arg, int snapshot, void *machine, |
|
200 |
int *fatal_error); |
|
200 | 201 |
|
201 | 202 |
/* acpi */ |
202 | 203 |
typedef void (*qemu_system_device_hot_add_t)(int pcibus, int slot, int state); |
... | ... | |
207 | 208 |
|
208 | 209 |
typedef int (dev_match_fn)(void *dev_private, void *arg); |
209 | 210 |
|
210 |
int add_init_drive(const char *opts);
|
|
211 |
DriveInfo *add_init_drive(const char *opts);
|
|
211 | 212 |
void destroy_nic(dev_match_fn *match_fn, void *arg); |
212 | 213 |
void destroy_bdrvs(dev_match_fn *match_fn, void *arg); |
213 | 214 |
|
Also available in: Unified diff