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-devel

[Xen-devel] [PATCH] ioemu: fix pt_chk_bar_overload

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu: fix pt_chk_bar_overload
From: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
Date: Wed, 16 Jul 2008 17:02:39 +0100
Delivery-date: Wed, 16 Jul 2008 09:03:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)

ioemu: fix the devices loop.

Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>

--
Jean Guyader
diff --git a/hw/pass-through.c b/hw/pass-through.c
index bddc203..f29f07d 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -713,7 +713,7 @@ int pt_init(PCIBus *e_bus, char *direct_pci)
     dpci_infos.pci_access = pci_access;
     dpci_infos.e_bus      = e_bus;
 
-    if ( strlen(direct_pci) == 0 ) {
+    if ( !direct_pci || strlen(direct_pci) == 0 ) {
         return 0;
     }
 
diff --git a/hw/pass-through.h b/hw/pass-through.h
index ffd87ef..d642be3 100644
--- a/hw/pass-through.h
+++ b/hw/pass-through.h
@@ -27,7 +27,7 @@
 #define PT_LOGGING_ENABLED
 
 #ifdef PT_LOGGING_ENABLED
-#define PT_LOG(_f, _a...)   fprintf(logfile, "%s: " _f, __func__, ##_a)
+#define PT_LOG(_f, _a...)   fprintf(stdout, "%s: " _f, __func__, ##_a)
 #else
 #define PT_LOG(_f, _a...)
 #endif
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel