[PATCH] Fix error(help) messages in main.py and shutdown.py

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Fix error(help) messages in main.py and shutdown.py

Yoshinori Katase
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 <[hidden email]>
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)

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel

reboot.shutdown.patch (1010 bytes) Download Attachment