Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Bug fixes in 8259: now handles irqs>=8
[palacios.git] / palacios / src / devices / generic.c
index 11cad40..8d329f5 100644 (file)
@@ -326,20 +326,26 @@ struct vm_device *create_generic(generic_port_range_type    port_ranges[],
   num_port_ranges=0;
   if (port_ranges!=NULL) { 
     i=0;
-    while (port_ranges[i]!=NULL && port_ranges[i][0]!=0 && port_ranges[i][1]!=0 && port_ranges[i][2]!=0) { num_port_ranges++; i++; }
+    while (port_ranges[i]!=NULL && 
+          !(port_ranges[i][0]==0 && port_ranges[i][1]==0 && port_ranges[i][2]==0)) 
+      { num_port_ranges++; i++; }
   }
 
   
   num_address_ranges=0;
   if (address_ranges!=NULL) { 
     i=0;
-    while (address_ranges[i]!=NULL  && address_ranges[i][0]!=0 && address_ranges[i][1]!=0 && address_ranges[i][2]!=0) { num_address_ranges++; i++; }
+    while (address_ranges[i]!=NULL  && 
+          !(address_ranges[i][0]==0 && address_ranges[i][1]==0 && address_ranges[i][2]==0)) 
+      { num_address_ranges++; i++; }
   }
 
   num_irq_ranges=0;
   if (irq_ranges!=NULL) { 
     i=0;
-    while (irq_ranges[i]!=NULL && irq_ranges[i][0]!=0 && irq_ranges[i][1]!=0 && irq_ranges[i][2]!=0) { num_irq_ranges++; i++; }
+    while (irq_ranges[i]!=NULL && 
+          !(irq_ranges[i][0]==0 && irq_ranges[i][1]==0 && irq_ranges[i][2]==0) ) 
+      { num_irq_ranges++; i++; }
   }