@@ -163,7 +163,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error)
if (default_to_scsi) {
type = IF_SCSI;
- max_devs = MAX_SCSI_DEVS;
+ max_devs = DEFAULT_SCSI_DEVS_PER_BUS;
pstrcpy(devname, sizeof(devname), "scsi");
} else {
type = IF_IDE;
@@ -194,7 +194,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error)
max_devs = MAX_IDE_DEVS;
} else if (!strcmp(buf, "scsi")) {
type = IF_SCSI;
- max_devs = MAX_SCSI_DEVS;
+ max_devs = DEFAULT_SCSI_DEVS_PER_BUS;
} else if (!strcmp(buf, "floppy")) {
type = IF_FLOPPY;
max_devs = 0;
@@ -31,8 +31,9 @@ struct DriveInfo {
QTAILQ_ENTRY(DriveInfo) next;
};
-#define MAX_IDE_DEVS 2
-#define MAX_SCSI_DEVS 255
+#define MAX_IDE_DEVS 2
+#define MAX_SCSI_DEVS 255
+#define DEFAULT_SCSI_DEVS_PER_BUS 7
DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
int drive_get_max_bus(BlockInterfaceType type);