Skip to contentSkip to conversation

Print shorthelp of xm shutdown

PATCH New Masaki Kanno 1 participant 1 message Jul 28, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Print shorthelp of xm shutdown

Hi,

This patch prints shorthelp of xm shutdown.

# xm shutdown
Error: 'xm shutdown' requires between 1 and 4 arguments.

shutdown <DomId> [-w][-a][-R|-H] Shutdown a domain

# xm shutdown vm1 -w -a -R -H
Error: 'xm shutdown' requires between 1 and 4 arguments.

shutdown <DomId> [-w][-a][-R|-H] Shutdown a domain

Best regards,
Kan

tools/python/xen/xm/main.py +6 -1
diff -r 58072466abfa tools/python/xen/xm/main.py
@@ -569,6 +569,11 @@ def xm_reboot(args):
     from xen.xm import shutdown
     shutdown.main(["shutdown", "-R"] + args)
 
+def xm_shutdown(args):
+    arg_check(args, "shutdown", 1, 4)
+    from xen.xm import shutdown
+    shutdown.main(["shutdown"] + args)
+
 def xm_pause(args):
     arg_check(args, "pause", 1)
     dom = args[0]
@@ -1109,6 +1114,7 @@ commands = {
     "restore": xm_restore,
     "save": xm_save,
     "reboot": xm_reboot,
+    "shutdown": xm_shutdown,
     "list": xm_list,
     # memory commands
     "mem-max": xm_mem_max,
@@ -1151,7 +1157,6 @@ subcommands = [
     'create',
     'migrate',
     'sysrq',
-    'shutdown',
     'labels',
     'addlabel',
     'rmlabel',

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