[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix xm sched-credit when given an invalid domain name.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |