Revision 3b0ba927 sysemu.h
b/sysemu.h | ||
---|---|---|
159 | 159 |
|
160 | 160 |
#define BLOCK_SERIAL_STRLEN 20 |
161 | 161 |
|
162 |
typedef struct DriveOpt { |
|
163 |
const char *file; |
|
164 |
char opt[1024]; |
|
165 |
TAILQ_ENTRY(DriveOpt) next; |
|
166 |
} DriveOpt; |
|
167 |
|
|
162 | 168 |
typedef struct DriveInfo { |
163 | 169 |
BlockDriverState *bdrv; |
164 | 170 |
char *id; |
... | ... | |
166 | 172 |
BlockInterfaceType type; |
167 | 173 |
int bus; |
168 | 174 |
int unit; |
169 |
int drive_opt_idx;
|
|
175 |
DriveOpt *opt;
|
|
170 | 176 |
BlockInterfaceErrorAction onerror; |
171 | 177 |
char serial[BLOCK_SERIAL_STRLEN + 1]; |
172 | 178 |
TAILQ_ENTRY(DriveInfo) next; |
... | ... | |
177 | 183 |
#define MAX_DRIVES 32 |
178 | 184 |
|
179 | 185 |
extern TAILQ_HEAD(drivelist, DriveInfo) drives; |
186 |
extern TAILQ_HEAD(driveoptlist, DriveOpt) driveopts; |
|
180 | 187 |
|
181 | 188 |
extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit); |
182 | 189 |
extern DriveInfo *drive_get_by_id(char *id); |
183 | 190 |
extern int drive_get_max_bus(BlockInterfaceType type); |
184 | 191 |
extern void drive_uninit(BlockDriverState *bdrv); |
185 |
extern void drive_remove(int index);
|
|
192 |
extern void drive_remove(DriveOpt *opt);
|
|
186 | 193 |
extern const char *drive_get_serial(BlockDriverState *bdrv); |
187 | 194 |
extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv); |
188 | 195 |
|
189 | 196 |
BlockDriverState *qdev_init_bdrv(DeviceState *dev, BlockInterfaceType type); |
190 | 197 |
|
191 |
struct drive_opt { |
|
192 |
const char *file; |
|
193 |
char opt[1024]; |
|
194 |
int used; |
|
195 |
}; |
|
196 |
|
|
197 |
extern struct drive_opt drives_opt[MAX_DRIVES]; |
|
198 |
extern int nb_drives_opt; |
|
199 |
|
|
200 |
extern int drive_add(const char *file, const char *fmt, ...); |
|
201 |
extern DriveInfo *drive_init(struct drive_opt *arg, int snapshot, void *machine, |
|
198 |
extern DriveOpt *drive_add(const char *file, const char *fmt, ...); |
|
199 |
extern DriveInfo *drive_init(DriveOpt *arg, int snapshot, void *machine, |
|
202 | 200 |
int *fatal_error); |
203 | 201 |
|
204 | 202 |
/* acpi */ |
Also available in: Unified diff