WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Dom0 might not be called Domain-0, so ask for the name i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of hardcoding it
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 11:28:13 +0000
Delivery-date: Thu, 17 Nov 2005 11:29:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User jmb@xxxxxxxxxxxxxxxxxxxxx
# Node ID dee321bf18e98ddc1058dcc60d7329d4015a13a9
# Parent  5019c8d034c42bc343000ff450ef90476846c2c3
Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead 
of hardcoding it

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>

diff -r 5019c8d034c4 -r dee321bf18e9 tools/python/xen/xm/shutdown.py
--- a/tools/python/xen/xm/shutdown.py   Wed Nov 16 10:32:14 2005
+++ b/tools/python/xen/xm/shutdown.py   Wed Nov 16 12:34:52 2005
@@ -22,9 +22,9 @@
 import time
 
 from xen.xend.XendClient import server
+from xen.xend import sxp
 from xen.xm.opts import *
 
-DOM0_NAME = 'Domain-0'
 DOM0_ID = '0'
 
 gopts = Opts(use="""[options] [DOM]
@@ -54,7 +54,8 @@
 
 def shutdown(opts, doms, mode, wait):
     if doms == None: doms = server.xend_domains()
-    for x in [DOM0_NAME, DOM0_ID]:
+    dom0_name = sxp.child_value(server.xend_domain(0), 'name')
+    for x in [dom0_name, DOM0_ID]:
         if x in doms:
             doms.remove(x)
     for d in doms:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of hardcoding it, Xen patchbot -unstable <=