Skip to contentSkip to conversation

Trivial fix for xm save

PATCH New Masaki Kanno 1 participant 1 message Feb 12, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

Best regards,
Kan

tools/python/xen/xm/main.py +1 -1
diff -r bf9cdbec516a tools/python/xen/xm/main.py
@@ -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:
tools/python/xen/xm/main.py +1 -1
diff -r bf9cdbec516a tools/python/xen/xm/main.py
@@ -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:

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