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] [xen-unstable] Fix xm sched-credit when given an invalid

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix xm sched-credit when given an invalid domain name.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Feb 2007 12:25:12 -0800
Delivery-date: Tue, 06 Feb 2007 12:25:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170777929 0
# Node ID 2379569b590df5bb228ce470c74e3ec3d3ef4a6a
# Parent  39a2833dde5121b3e776a0ef2c6fcde4f23bd9f7
Fix xm sched-credit when given an invalid domain name.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r 39a2833dde51 -r 2379569b590d tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Feb 06 15:37:11 2007 +0000
+++ b/tools/python/xen/xm/main.py       Tue Feb 06 16:05:29 2007 +0000
@@ -1144,6 +1144,9 @@ def xm_sched_sedf(args):
     doms = filter(lambda x : domid_match(domid, x),
                         [parse_doms_info(dom)
                          for dom in getDomains(None, 'running')])
+    if domid is not None and doms == []: 
+        err("Domain '%s' does not exist." % domid)
+        usage('sched-sedf')
 
     # print header if we aren't setting any parameters
     if len(opts.keys()) == 0:
@@ -1207,6 +1210,9 @@ def xm_sched_credit(args):
                   for dom in getDomains(None, 'running')])
 
     if weight is None and cap is None:
+        if domid is not None and doms == []: 
+            err("Domain '%s' does not exist." % domid)
+            usage('sched-credit')
         # print header if we aren't setting any parameters
         print '%-33s %-2s %-6s %-4s' % ('Name','ID','Weight','Cap')
         

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix xm sched-credit when given an invalid domain name., Xen patchbot-unstable <=