WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [ioemu] Consistently extend all block dev

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [ioemu] Consistently extend all block device operations to include scsi disks.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Apr 2007 09:20:22 -0700
Delivery-date: Thu, 12 Apr 2007 09:20:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [ioemu] Consistently extend all block device operations to include scsi disks., Xen patchbot-unstable <=