]> xenbits.xensource.com Git - xen.git/commitdiff
[XM] When two or more domain parameters are given, the xm reboot
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 29 Jun 2006 13:25:35 +0000 (14:25 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 29 Jun 2006 13:25:35 +0000 (14:25 +0100)
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>
tools/python/xen/xm/shutdown.py

index fbd3d8f3aad540acb082016261bc6e3d1045d3ac..3a0e2c8c9d4d9b7999518ca6acdb075885926623 100644 (file)
@@ -92,7 +92,8 @@ def main_all(opts, args):
     shutdown(opts, None, mode, opts.vals.wait)
 
 def main_dom(opts, args):
-    if len(args) < 1: opts.err('Missing domain')
+    if len(args) == 0: opts.err('No domain parameter given')
+    if len(args) >  1: opts.err('No multiple domain parameters allowed')
     dom = args[0]
     mode = shutdown_mode(opts)  
     shutdown(opts, [ dom ], mode, opts.vals.wait)