direct-io.hg

changeset 7952:fbd3f3cb6f65

Return the changed path as an argument to the watch callback. This is useful
for the test CD, and simplifies DevController everso slightly. It ought to be
generally useful, too.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Mon Nov 21 18:33:17 2005 +0100 (2005-11-21)
parents 27a2cb379c8f
children 976e53674e84
files tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/DevController.py tools/python/xen/xend/xenstore/xswatch.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Mon Nov 21 17:06:42 2005 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Mon Nov 21 18:33:17 2005 +0100
     1.3 @@ -114,7 +114,7 @@ class XendDomain:
     1.4  
     1.5      ## private:
     1.6  
     1.7 -    def onReleaseDomain(self):
     1.8 +    def onReleaseDomain(self, _):
     1.9          self.domains_lock.acquire()
    1.10          try:
    1.11              self.refresh()
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Nov 21 17:06:42 2005 +0100
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Nov 21 18:33:17 2005 +0100
     2.3 @@ -424,7 +424,7 @@ class XendDomainInfo:
     2.4              return []
     2.5  
     2.6  
     2.7 -    def storeChanged(self):
     2.8 +    def storeChanged(self, _):
     2.9          log.trace("XendDomainInfo.storeChanged");
    2.10  
    2.11          changed = False
     3.1 --- a/tools/python/xen/xend/server/DevController.py	Mon Nov 21 17:06:42 2005 +0100
     3.2 +++ b/tools/python/xen/xend/server/DevController.py	Mon Nov 21 18:33:17 2005 +0100
     3.3 @@ -328,7 +328,7 @@ class DevController:
     3.4              ev = Event()
     3.5              result = { 'status': Timeout }
     3.6              
     3.7 -            xswatch(statusPath, hotplugStatusCallback, statusPath, ev, result)
     3.8 +            xswatch(statusPath, hotplugStatusCallback, ev, result)
     3.9  
    3.10              ev.wait(DEVICE_CREATE_TIMEOUT)
    3.11              return result['status']
     4.1 --- a/tools/python/xen/xend/xenstore/xswatch.py	Mon Nov 21 17:06:42 2005 +0100
     4.2 +++ b/tools/python/xen/xend/xenstore/xswatch.py	Mon Nov 21 18:33:17 2005 +0100
     4.3 @@ -51,7 +51,7 @@ def watchMain():
     4.4          try:
     4.5              we = xs.read_watch()
     4.6              watch = we[1]
     4.7 -            res = watch.fn(*watch.args, **watch.kwargs)
     4.8 +            res = watch.fn(we[0], *watch.args, **watch.kwargs)
     4.9              if not res:
    4.10                  watch.unwatch()
    4.11          except: