aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-09-05 17:06:02 +0100
committerEwan Mellor <ewan@xensource.com>2006-09-05 17:06:02 +0100
commitbd5b7756c33c8eabc7d946468c3cf0c8f1a264bc (patch)
treea99cdb4edbc67c6324ab20894ae671f6d724befa /tools/xenmon
parent8037b37752eb7d17b02650e0f6b3115a0e04de1a (diff)
downloadxen-bd5b7756c33c8eabc7d946468c3cf0c8f1a264bc.tar.gz
xen-bd5b7756c33c8eabc7d946468c3cf0c8f1a264bc.tar.bz2
xen-bd5b7756c33c8eabc7d946468c3cf0c8f1a264bc.zip
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@jp.fujitsu.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r--tools/xenmon/xenmon.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/xenmon/xenmon.py b/tools/xenmon/xenmon.py
index 1b74d19403..402b6b4e18 100644
--- a/tools/xenmon/xenmon.py
+++ b/tools/xenmon/xenmon.py
@@ -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: