xenmon: --ms_per_sample: check a negative value
PATCH 1/1 xenmon: --ms_per_sample: check a negative value
Hi,
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 <[email protected]>
Signature · 1 line
KUWAMURA Shin'ya
tools/xenmon/xenmon.py +3 -0
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedQuoted 5 lines · KUWAMURA Shin'ya
Hi,
This patch adds the argument check of "--ms_per_sample=" option. For "--ms_per_sample=", a negative value should be invalid.
Quoted 7 lines
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 <[email protected]>
Applied, thanks.
Ewan.