All of lore.kernel.org
 help / color / mirror / Atom feed
From: lists-xen@pimb.org
To: xen-devel@lists.xensource.com
Subject: [PATCH] remove dom0 name assumption in shutdown.py
Date: Wed, 16 Nov 2005 13:18:29 +0100	[thread overview]
Message-ID: <20051116121829.GA23380@pimb.org> (raw)

[-- Attachment #1: shutdown.patch --]
[-- Type: text/plain, Size: 1025 bytes --]

# HG changeset patch
# User jmb@artemis.home.pimb.org
# 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:

             reply	other threads:[~2005-11-16 12:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 12:18 lists-xen [this message]
2005-11-16 12:35 ` [PATCH] remove dom0 name assumption in shutdown.py Ewan Mellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051116121829.GA23380@pimb.org \
    --to=lists-xen@pimb.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.