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

[Xen-changelog] [xen-unstable] libxc: Fix xc_domain_bind_pt_irq().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1198758644 0
# Node ID d24f457fa1afd40112b66e64c180c4f8c5bda46b
# Parent  003542d9ab7713ffcecb7a91a2639083b7da4af5
libxc: Fix xc_domain_bind_pt_irq().
Signed-off-by: Guy Zana <guy@xxxxxxxxxxxx>
---
 tools/libxc/xc_domain.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r 003542d9ab77 -r d24f457fa1af tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Thu Dec 27 12:28:58 2007 +0000
+++ b/tools/libxc/xc_domain.c   Thu Dec 27 12:30:44 2007 +0000
@@ -786,7 +786,7 @@ int xc_domain_bind_pt_irq(
     uint8_t bus,
     uint8_t device,
     uint8_t intx,
-                                                 uint8_t isa_irq)
+    uint8_t isa_irq)
 {
     int rc;
     xen_domctl_bind_pt_irq_t * bind;
@@ -799,10 +799,14 @@ int xc_domain_bind_pt_irq(
     bind->hvm_domid = domid;
     bind->irq_type = irq_type;
     bind->machine_irq = machine_irq;
-    bind->u.pci.bus = bus;
-    bind->u.pci.device = device;    
-    bind->u.pci.intx = intx;
-    bind->u.isa.isa_irq = isa_irq;
+    if ( irq_type == PT_IRQ_TYPE_PCI )
+    {
+        bind->u.pci.bus = bus;
+        bind->u.pci.device = device;    
+        bind->u.pci.intx = intx;
+    } 
+    else if ( irq_type == PT_IRQ_TYPE_ISA )
+        bind->u.isa.isa_irq = isa_irq;
     
     rc = do_domctl(xc_handle, &domctl);
     return rc;

_______________________________________________
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®.