aboutsummaryrefslogtreecommitdiff
path: root/sysemu.h
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-02 04:51:10 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-02 04:51:10 +0000
commite4bcb14c79fb63a35aef3eb39e02c16c19b8b28d (patch)
tree06bee4b9dbf4c7b50e20c9996924d7d132cdfec2 /sysemu.h
parent7233b355571ad2a8e7aec7eb19db5f530e81f052 (diff)
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sysemu.h')
-rw-r--r--sysemu.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/sysemu.h b/sysemu.h
index d54f115aa2..8bb88b12cd 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -116,15 +116,26 @@ extern unsigned int nb_prom_envs;
#define BIOS_SIZE (4 * 1024 * 1024)
#endif
-#define MAX_DISKS 4
-
-extern BlockDriverState *bs_table[MAX_DISKS + 1];
-extern BlockDriverState *sd_bdrv;
-extern BlockDriverState *mtd_bdrv;
-
-/* NOR flash devices */
-#define MAX_PFLASH 4
-extern BlockDriverState *pflash_table[MAX_PFLASH];
+typedef enum {
+ IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD
+} BlockInterfaceType;
+
+typedef struct DriveInfo {
+ BlockDriverState *bdrv;
+ BlockInterfaceType interface;
+ int bus;
+ int unit;
+} DriveInfo;
+
+#define MAX_IDE_DEVS 2
+#define MAX_SCSI_DEVS 7
+#define MAX_DRIVES 32
+
+int nb_drives;
+DriveInfo drives_table[MAX_DRIVES+1];
+
+extern int drive_get_index(BlockInterfaceType interface, int bus, int unit);
+extern int drive_get_max_bus(BlockInterfaceType interface);
/* serial ports */