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

[Xen-changelog] [xen-unstable] This patch adds the argument check of "--ms_per_sample=" option. For



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID cd0396953d1ae95f95d1d29708e68d68119b1355
# Parent  ae46cac4865930a0a1b6ba57d33624c025715717
This patch adds the argument check of "--ms_per_sample=" option. For
"--ms_per_sample=", a negative value should be invalid.

e.g.
% xenmon.py -n --ms_per_sample=-1
usage: xenmon.py [options]

xenmon.py: error: option --ms_per_sample: invalid negative value: '-1'

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 tools/xenmon/xenmon.py |    3 +++
 1 files changed, 3 insertions(+)

diff -r ae46cac48659 -r cd0396953d1a tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py    Tue Sep 05 17:06:01 2006 +0100
+++ b/tools/xenmon/xenmon.py    Tue Sep 05 17:06:02 2006 +0100
@@ -672,6 +672,9 @@ def main():
 
     parser = setup_cmdline_parser()
     (options, args) = parser.parse_args()
+    if options.mspersample < 0:
+        parser.error("option --ms_per_sample: invalid negative value: '%d'" %
+                     options.mspersample)
     
     start_xenbaked()
     if options.live:

_______________________________________________
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®.