[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [ioemu] Consistently extend all block device operations to include scsi disks.



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1176329107 -3600
# Node ID d56692b16296e64c602db6a6f075043ac1000f74
# Parent  27eaa7fe92d26c97a98d0564c47ecde3c428b9e0
[ioemu] Consistently extend all block device operations to include scsi disks.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/monitor.c  |    2 +-
 tools/ioemu/vl.c       |   10 +++++-----
 tools/ioemu/vl.h       |    2 +-
 tools/ioemu/xenstore.c |    6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff -r 27eaa7fe92d2 -r d56692b16296 tools/ioemu/monitor.c
--- a/tools/ioemu/monitor.c     Wed Apr 11 19:04:10 2007 +0100
+++ b/tools/ioemu/monitor.c     Wed Apr 11 23:05:07 2007 +0100
@@ -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]);
         }
diff -r 27eaa7fe92d2 -r d56692b16296 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Wed Apr 11 19:04:10 2007 +0100
+++ b/tools/ioemu/vl.c  Wed Apr 11 23:05:07 2007 +0100
@@ -116,7 +116,7 @@ void *ioport_opaque[MAX_IOPORTS];
 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];
diff -r 27eaa7fe92d2 -r d56692b16296 tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Wed Apr 11 19:04:10 2007 +0100
+++ b/tools/ioemu/vl.h  Wed Apr 11 23:05:07 2007 +0100
@@ -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);
diff -r 27eaa7fe92d2 -r d56692b16296 tools/ioemu/xenstore.c
--- a/tools/ioemu/xenstore.c    Wed Apr 11 19:04:10 2007 +0100
+++ b/tools/ioemu/xenstore.c    Wed Apr 11 23:05:07 2007 +0100
@@ -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 do
     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();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.