WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Trivial fix for xm save
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2009 11:06:36 +0900
Delivery-date: Wed, 11 Feb 2009 18:07:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Trivial fix for xm save, Masaki Kanno <=