[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] xm: Show usage message of xm commands



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1267009896 0
# Node ID e22aeb8a017723a74c7aa44dc979d7d115b9ac82
# Parent  3ccf3e993d5ddc4e5dff15e464dc63d5485e984c
xm: Show usage message of xm commands

The following commands don't show an usage message even if we give
a wrong option to the commands.

 - xm block-list
 - xm network-list
 - xm network2-list
 - xm vtpm-list
 - xm pci-list
 - xm scsi-list

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized

This patch shows the usage message of the commands.

e.g.
 # xm block-list --xxx vm1
 Error: option --xxx not recognized
 Usage: xm block-list <Domain> [--long]
 List virtual block devices for a domain.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
xen-unstable changeset:   20970:ec5c9373e821
xen-unstable date:        Wed Feb 24 10:46:49 2010 +0000
---
 tools/python/xen/xm/main.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 3ccf3e993d5d -r e22aeb8a0177 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Wed Feb 24 11:11:05 2010 +0000
+++ b/tools/python/xen/xm/main.py       Wed Feb 24 11:11:36 2010 +0000
@@ -2035,7 +2035,7 @@ def arg_check_for_resource_list(args, na
         (options, params) = getopt.gnu_getopt(args, 'l', ['long'])
     except getopt.GetoptError, opterr:
         err(opterr)
-        sys.exit(1)
+        usage(name)
 
     for (k, v) in options:
         if k in ['-l', '--long']:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.