ia64/xen-unstable

changeset 16666:d24f457fa1af

libxc: Fix xc_domain_bind_pt_irq().
Signed-off-by: Guy Zana <guy@neocleus.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 27 12:30:44 2007 +0000 (2007-12-27)
parents 003542d9ab77
children 9bf8b152df9f
files tools/libxc/xc_domain.c
line diff
     1.1 --- a/tools/libxc/xc_domain.c	Thu Dec 27 12:28:58 2007 +0000
     1.2 +++ b/tools/libxc/xc_domain.c	Thu Dec 27 12:30:44 2007 +0000
     1.3 @@ -786,7 +786,7 @@ int xc_domain_bind_pt_irq(
     1.4      uint8_t bus,
     1.5      uint8_t device,
     1.6      uint8_t intx,
     1.7 -                                                 uint8_t isa_irq)
     1.8 +    uint8_t isa_irq)
     1.9  {
    1.10      int rc;
    1.11      xen_domctl_bind_pt_irq_t * bind;
    1.12 @@ -799,10 +799,14 @@ int xc_domain_bind_pt_irq(
    1.13      bind->hvm_domid = domid;
    1.14      bind->irq_type = irq_type;
    1.15      bind->machine_irq = machine_irq;
    1.16 -    bind->u.pci.bus = bus;
    1.17 -    bind->u.pci.device = device;    
    1.18 -    bind->u.pci.intx = intx;
    1.19 -    bind->u.isa.isa_irq = isa_irq;
    1.20 +    if ( irq_type == PT_IRQ_TYPE_PCI )
    1.21 +    {
    1.22 +        bind->u.pci.bus = bus;
    1.23 +        bind->u.pci.device = device;    
    1.24 +        bind->u.pci.intx = intx;
    1.25 +    } 
    1.26 +    else if ( irq_type == PT_IRQ_TYPE_ISA )
    1.27 +        bind->u.isa.isa_irq = isa_irq;
    1.28      
    1.29      rc = do_domctl(xc_handle, &domctl);
    1.30      return rc;