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.


Cleanup and sanity-checking of switch issues, negative array indexes, operand indepen...
[palacios.git] / palacios / src / devices / generic.c
index 23f00ce..1e06a80 100644 (file)
@@ -194,14 +194,19 @@ static int generic_read_port_print_and_passthrough(struct guest_info * core, uin
 
     rc=generic_read_port_passthrough(core,port,src,length,priv_data);
 
-    PrintDebug(core->vm_info, core, " done ... read 0x");
-
-    for (i = 0; i < rc; i++) { 
-       PrintDebug(core->vm_info, core, "%x", ((uint8_t *)src)[i]);
+    if (rc<0) { 
+       PrintError(core->vm_info, core, "FAILED\n");
+       return rc;
+    } else {
+       PrintDebug(core->vm_info, core, " done ... read 0x");
+       
+       for (i = 0; i < rc; i++) { 
+           PrintDebug(core->vm_info, core, "%x", ((uint8_t *)src)[i]);
+       }
+       
+       PrintDebug(core->vm_info, core, "\n");
     }
-
-    PrintDebug(core->vm_info, core, "\n");
-
+    
     return rc;
 }