debuggers.hg

diff tools/libxl/libxl_dom.c @ 22624:60782cefa154

libxc: convert evtchn interfaces to use an opaque handle type

This makes the interface consistent with the changes made to the main
interface in 21483:779c0ef9682c.

Also fix some references to "struct xc_interface" which should have
been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to
pull in the corresponding qemu change.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Ian Campbell <ian.campbell@citrix.com>
date Thu Dec 23 15:25:57 2010 +0000 (2010-12-23)
parents ab785e37499c
children 4fea7664a6fb
line diff
     1.1 --- a/tools/libxl/libxl_dom.c	Thu Dec 23 15:08:21 2010 +0000
     1.2 +++ b/tools/libxl/libxl_dom.c	Thu Dec 23 15:25:57 2010 +0000
     1.3 @@ -315,7 +315,7 @@ int libxl__domain_restore_common(libxl_c
     1.4  
     1.5  struct suspendinfo {
     1.6      libxl__gc *gc;
     1.7 -    int xce; /* event channel handle */
     1.8 +    xc_evtchn *xce; /* event channel handle */
     1.9      int suspend_eventchn;
    1.10      int domid;
    1.11      int hvm;
    1.12 @@ -419,11 +419,11 @@ int libxl__domain_suspend_common(libxl_c
    1.13      si.gc = &gc;
    1.14      si.suspend_eventchn = -1;
    1.15  
    1.16 -    si.xce = xc_evtchn_open();
    1.17 -    if (si.xce < 0)
    1.18 +    si.xce = xc_evtchn_open(NULL, 0);
    1.19 +    if (si.xce == NULL)
    1.20          goto out;
    1.21 -
    1.22 -    if (si.xce > 0) {
    1.23 +    else
    1.24 +    {
    1.25          port = xs_suspend_evtchn_port(si.domid);
    1.26  
    1.27          if (port >= 0) {
    1.28 @@ -447,7 +447,7 @@ int libxl__domain_suspend_common(libxl_c
    1.29  
    1.30      if (si.suspend_eventchn > 0)
    1.31          xc_suspend_evtchn_release(ctx->xch, si.xce, domid, si.suspend_eventchn);
    1.32 -    if (si.xce > 0)
    1.33 +    if (si.xce != NULL)
    1.34          xc_evtchn_close(si.xce);
    1.35  
    1.36  out: