From: "KUWAMURA Shin'ya" Subject: [PATCH] xenmon: --ms_per_sample: check a negative value Date: Tue, 05 Sep 2006 13:50:15 +0900 (JST) Message-ID: <20060905.135015.35717899.kuwa@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Sep__5_13_50_15_2006_141)--" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ----Next_Part(Tue_Sep__5_13_50_15_2006_141)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 -- KUWAMURA Shin'ya ----Next_Part(Tue_Sep__5_13_50_15_2006_141)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xenmon-ms_per_sample.patch" diff -r 3d36f020e62a tools/xenmon/xenmon.py --- a/tools/xenmon/xenmon.py Mon Sep 04 13:54:36 2006 -0700 +++ b/tools/xenmon/xenmon.py Fri Sep 01 13:33:17 2006 +0900 @@ -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: ----Next_Part(Tue_Sep__5_13_50_15_2006_141)-- Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ----Next_Part(Tue_Sep__5_13_50_15_2006_141)----