ia64/xen-unstable

changeset 11433:cd0396953d1a

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>
author Ewan Mellor <ewan@xensource.com>
date Tue Sep 05 17:06:02 2006 +0100 (2006-09-05)
parents ae46cac48659
children e58bf6e0572e
files tools/xenmon/xenmon.py
line diff
     1.1 --- a/tools/xenmon/xenmon.py	Tue Sep 05 17:06:01 2006 +0100
     1.2 +++ b/tools/xenmon/xenmon.py	Tue Sep 05 17:06:02 2006 +0100
     1.3 @@ -672,6 +672,9 @@ def main():
     1.4  
     1.5      parser = setup_cmdline_parser()
     1.6      (options, args) = parser.parse_args()
     1.7 +    if options.mspersample < 0:
     1.8 +        parser.error("option --ms_per_sample: invalid negative value: '%d'" %
     1.9 +                     options.mspersample)
    1.10      
    1.11      start_xenbaked()
    1.12      if options.live: