[ioemu] Consistently extend all block device operations to include scsi disks.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
This commit is contained in:
Christian Limpach committed 2007-04-11 23:05:07 +01:00
1 parent 58fcf598b5
commit f138b72d1e
4 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -180,7 +180,7 @@ static void do_commit(void)
{
int i;
for (i = 0; i < MAX_DISKS; i++) {
for (i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++) {
if (bs_table[i]) {
bdrv_commit(bs_table[i]);
}
+5 -5
View File
@@ -116,7 +116,7 @@ char phys_ram_file[1024];
void *ioport_opaque[MAX_IOPORTS];
IOPortReadFunc *ioport_read_table[3][MAX_IOPORTS];
IOPortWriteFunc *ioport_write_table[3][MAX_IOPORTS];
BlockDriverState *bs_table[MAX_DISKS+MAX_SCSI_DISKS], *fd_table[MAX_FD];
BlockDriverState *bs_table[MAX_DISKS + MAX_SCSI_DISKS], *fd_table[MAX_FD];
int vga_ram_size;
int bios_size;
static DisplayState display_state;
@@ -1396,7 +1396,7 @@ static void stdio_received_byte(int ch)
case 's':
{
int i;
for (i = 0; i < MAX_DISKS; i++) {
for (i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++) {
if (bs_table[i])
bdrv_commit(bs_table[i]);
}
@@ -6057,7 +6057,7 @@ int main(int argc, char **argv)
int snapshot, linux_boot;
const char *initrd_filename;
#ifndef CONFIG_DM
const char *hd_filename[MAX_DISKS];
const char *hd_filename[MAX_DISKS + MAX_SCSI_DISKS];
#endif /* !CONFIG_DM */
const char *fd_filename[MAX_FD];
const char *kernel_filename, *kernel_cmdline;
@@ -6126,7 +6126,7 @@ int main(int argc, char **argv)
for(i = 0; i < MAX_FD; i++)
fd_filename[i] = NULL;
#ifndef CONFIG_DM
for(i = 0; i < MAX_DISKS; i++)
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
hd_filename[i] = NULL;
#endif /* !CONFIG_DM */
ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
@@ -6724,7 +6724,7 @@ int main(int argc, char **argv)
}
/* open the virtual block devices */
for(i = 0; i < MAX_DISKS; i++) {
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++) {
if (hd_filename[i]) {
if (!bs_table[i]) {
char buf[64];
+1 -1
View File
@@ -820,7 +820,7 @@ int vnc_start_viewer(int port);
#define MAX_DISKS 4
#define MAX_SCSI_DISKS 7
extern BlockDriverState *bs_table[MAX_DISKS+MAX_SCSI_DISKS];
extern BlockDriverState *bs_table[MAX_DISKS + MAX_SCSI_DISKS];
void isa_ide_init(int iobase, int iobase2, int irq,
BlockDriverState *hd0, BlockDriverState *hd1);
+3 -3
View File
@@ -18,7 +18,7 @@
#include <fcntl.h>
static struct xs_handle *xsh = NULL;
static char *media_filename[MAX_DISKS];
static char *media_filename[MAX_DISKS + MAX_SCSI_DISKS];
static QEMUTimer *insert_timer = NULL;
#define UWAIT_MAX (30*1000000) /* thirty seconds */
@@ -44,7 +44,7 @@ static void insert_media(void *opaque)
{
int i;
for (i = 0; i < MAX_DISKS; i++) {
for (i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++) {
if (media_filename[i] && bs_table[i]) {
do_change(bs_table[i]->device_name, media_filename[i]);
free(media_filename[i]);
@@ -86,7 +86,7 @@ void xenstore_parse_domain_config(int domid)
int i, is_scsi;
unsigned int len, num, hd_index;
for(i = 0; i < MAX_DISKS; i++)
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
media_filename[i] = NULL;
xsh = xs_daemon_open();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.