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-devel

[Xen-devel] [PATCH] remove dom0 name assumption in shutdown.py

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] remove dom0 name assumption in shutdown.py
From: lists-xen@xxxxxxxx
Date: Wed, 16 Nov 2005 13:18:29 +0100
Delivery-date: Wed, 16 Nov 2005 12:18:14 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040523i
# HG changeset patch
# User jmb@xxxxxxxxxxxxxxxxxxxxx
# Node ID 94a21101f5b1672736fe13746c156631dba96b9c
# Parent  9c7aeec94f8a085d69e6a4de9d5a27ebe98c0287
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 9c7aeec94f8a -r 94a21101f5b1 tools/python/xen/xm/shutdown.py
--- a/tools/python/xen/xm/shutdown.py   Tue Nov 15 18:46:48 2005
+++ b/tools/python/xen/xm/shutdown.py   Wed Nov 16 12:14:34 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>