From: "Yoshinori Katase" Subject: [PATCH] Fix error(help) messages in main.py and shutdown.py Date: Fri, 13 Jan 2006 10:02:13 +0900 Message-ID: <20060113010120.801391C004@mail1-sv.soft.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0016_01C61828.6D701BE0" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C61828.6D701BE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch fixes error(help) messages in main.py and shutdown.py. 1.change the maximun number of argument for xm_reboot 2.unify error message for xm_shutdown Signed-off-by: Yoshinori Katase Best Regards, Yoshinori Katase diff -r 1e1107e3d894 tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Wed Jan 11 19:14:27 2006 +++ b/tools/python/xen/xm/main.py Thu Jan 12 19:08:31 2006 @@ -501,7 +501,7 @@ def xm_reboot(args): - arg_check(args, "reboot", 1, 4) + arg_check(args, "reboot", 1, 3) from xen.xm import shutdown shutdown.main(["shutdown", "-R"] + args) diff -r 1e1107e3d894 tools/python/xen/xm/shutdown.py --- a/tools/python/xen/xm/shutdown.py Wed Jan 11 19:14:27 2006 +++ b/tools/python/xen/xm/shutdown.py Thu Jan 12 19:08:31 2006 @@ -92,7 +92,9 @@ shutdown(opts, None, mode, opts.vals.wait) def main_dom(opts, args): - if len(args) < 1: opts.err('Missing domain') + from xen.xm.main import arg_check + arg_check(args, "shutdown", 1, 4) + dom = args[0] mode = shutdown_mode(opts) shutdown(opts, [ dom ], mode, opts.vals.wait) ------=_NextPart_000_0016_01C61828.6D701BE0 Content-Type: application/octet-stream; name="reboot.shutdown.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="reboot.shutdown.patch" diff -r 1e1107e3d894 tools/python/xen/xm/main.py=0A= --- a/tools/python/xen/xm/main.py Wed Jan 11 19:14:27 2006=0A= +++ b/tools/python/xen/xm/main.py Thu Jan 12 19:08:31 2006=0A= @@ -501,7 +501,7 @@=0A= =0A= =0A= def xm_reboot(args):=0A= - arg_check(args, "reboot", 1, 4)=0A= + arg_check(args, "reboot", 1, 3)=0A= from xen.xm import shutdown=0A= shutdown.main(["shutdown", "-R"] + args)=0A= =0A= diff -r 1e1107e3d894 tools/python/xen/xm/shutdown.py=0A= --- a/tools/python/xen/xm/shutdown.py Wed Jan 11 19:14:27 2006=0A= +++ b/tools/python/xen/xm/shutdown.py Thu Jan 12 19:08:31 2006=0A= @@ -92,7 +92,9 @@=0A= shutdown(opts, None, mode, opts.vals.wait)=0A= =0A= def main_dom(opts, args):=0A= - if len(args) < 1: opts.err('Missing domain')=0A= + from xen.xm.main import arg_check=0A= + arg_check(args, "shutdown", 1, 4)=0A= +=0A= dom =3D args[0]=0A= mode =3D shutdown_mode(opts) =0A= shutdown(opts, [ dom ], mode, opts.vals.wait)=0A= ------=_NextPart_000_0016_01C61828.6D701BE0 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_NextPart_000_0016_01C61828.6D701BE0--