From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 29 Jun 2006 13:25:35 +0000 (+0100) Subject: [XM] When two or more domain parameters are given, the xm reboot X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15912^2~38 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b4e4e56cb1e5cda8ef6ecb0ec010fc1d7cf74850;p=xen.git [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 --- diff --git a/tools/python/xen/xm/shutdown.py b/tools/python/xen/xm/shutdown.py index fbd3d8f3aa..3a0e2c8c9d 100644 --- a/tools/python/xen/xm/shutdown.py +++ b/tools/python/xen/xm/shutdown.py @@ -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)