ia64/xen-unstable

changeset 10595:40e1a7749208

[XM] When two or more domain parameters are given, the xm reboot
command doesn't give a command error. This problem is also
included in the xm shutdown command.

This patch checks on domain parameter. If two or more domain
parameters are given, the command error occurs.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 29 14:25:35 2006 +0100 (2006-06-29)
parents c6ec3dd6fe7f
children a67c1bcb5522
files tools/python/xen/xm/shutdown.py
line diff
     1.1 --- a/tools/python/xen/xm/shutdown.py	Thu Jun 29 14:25:07 2006 +0100
     1.2 +++ b/tools/python/xen/xm/shutdown.py	Thu Jun 29 14:25:35 2006 +0100
     1.3 @@ -92,7 +92,8 @@ def main_all(opts, args):
     1.4      shutdown(opts, None, mode, opts.vals.wait)
     1.5  
     1.6  def main_dom(opts, args):
     1.7 -    if len(args) < 1: opts.err('Missing domain')
     1.8 +    if len(args) == 0: opts.err('No domain parameter given')
     1.9 +    if len(args) >  1: opts.err('No multiple domain parameters allowed')
    1.10      dom = args[0]
    1.11      mode = shutdown_mode(opts)  
    1.12      shutdown(opts, [ dom ], mode, opts.vals.wait)