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

[Xen-devel] [PATCH] Trivial fix for xm save



Hi,

When wrong options are given to xm save, I'd like to show the usage 
message of xm save as follows.

# xm save --hogehoge vm1 /tmp/vm1.save
Error: option --hogehoge not recognized
Usage: xm save [-c] <Domain> <CheckpointFile>

Save a domain state to restore later.
  -c, --checkpoint               Leave domain running after creating
                                 snapshot


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

diff -r bf9cdbec516a tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Wed Feb 11 16:36:59 2009 +0000
+++ b/tools/python/xen/xm/main.py       Thu Feb 12 10:55:27 2009 +0900
@@ -739,7 +739,7 @@ def xm_save(args):
         (options, params) = getopt.gnu_getopt(args, 'c', ['checkpoint'])
     except getopt.GetoptError, opterr:
         err(opterr)
-        sys.exit(1)
+        usage('save')
 
     checkpoint = False
     for (k, v) in options:


Attachment: xm_save.patch
Description: Binary data

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

 


Rackspace

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