direct-io.hg

changeset 13583:f06f8e134c48

[XEND] Prevent invalid arguments for destroy event channels.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Wed Jan 24 13:54:37 2007 +0000 (2007-01-24)
parents 9292da5e9a27
children 6a54b1d8d105
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Jan 24 13:49:25 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Jan 24 13:54:37 2007 +0000
     1.3 @@ -1577,18 +1577,21 @@ class XendDomainInfo:
     1.4          """Create an event channel to the domain.
     1.5          """
     1.6          try:
     1.7 -            return xc.evtchn_alloc_unbound(domid=self.domid, remote_dom=0)
     1.8 +            if self.domid != None:
     1.9 +                return xc.evtchn_alloc_unbound(domid = self.domid,
    1.10 +                                               remote_dom = 0)
    1.11          except:
    1.12 -            log.exception("Exception in alloc_unbound(%d)", self.domid)
    1.13 +            log.exception("Exception in alloc_unbound(%s)", str(self.domid))
    1.14              raise
    1.15  
    1.16      def _resetChannels(self):
    1.17          """Reset all event channels in the domain.
    1.18          """
    1.19          try:
    1.20 -            return xc.evtchn_reset(dom=self.domid)
    1.21 +            if self.domid != None:
    1.22 +                return xc.evtchn_reset(dom = self.domid)
    1.23          except:
    1.24 -            log.exception("Exception in evtcnh_reset(%d)", self.domid)
    1.25 +            log.exception("Exception in evtcnh_reset(%s)", str(self.domid))
    1.26              raise
    1.27  
    1.28