|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Added method XendDomain.privilegedDomain and use that in
# HG changeset patch
# User emellor@ewan
# Node ID cc998831741663583b64fc4c05f7d8f610a478aa
# Parent 716a0d177ffa27f3d5c7caf8acfb7b4ff9fd6384
Added method XendDomain.privilegedDomain and use that inside DevController to
avoid hard-coding the domain ID 0.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r 716a0d177ffa -r cc9988317416 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py Mon Oct 3 22:28:24 2005
+++ b/tools/python/xen/xend/XendDomain.py Mon Oct 3 23:21:49 2005
@@ -284,6 +284,11 @@
pass
return dominfo
+
+ def privilegedDomain(self):
+ return self.domains[PRIV_DOMAIN]
+
+
def domain_unpause(self, id):
"""Unpause domain execution.
diff -r 716a0d177ffa -r cc9988317416
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py Mon Oct 3 22:28:24 2005
+++ b/tools/python/xen/xend/server/DevController.py Mon Oct 3 23:21:49 2005
@@ -189,8 +189,17 @@
"""
import xen.xend.XendDomain
- backdom = xen.xend.XendDomain.instance().domain_lookup_by_name(
- sxp.child_value(config, 'backend', '0'))
+ xd = xen.xend.XendDomain.instance()
+
+ backdom_name = sxp.child_value(config, 'backend')
+ if backdom_name:
+ backdom = xd.domain_lookup_by_name(backdom_name)
+ else:
+ backdom = xd.privilegedDomain()
+
+ if not backdom:
+ raise VmError("Cannot configure device for unknown backend %s" %
+ backdom_name)
frontpath = self.frontendPath(devid)
backpath = self.backendPath(backdom, devid)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Added method XendDomain.privilegedDomain and use that inside DevController to,
Xen patchbot -unstable <=
|
|
|
|
|