Commit 7862bf3b authored by Gary Wong's avatar Gary Wong

Abort on unexpected trailing parameters, instead of silently ignoring them.

Perl "getopts" stops looking for options once the first non-option
has been seen, so putting the mandatory parameters in the middle of the
command line had meant we'd never look at the rest.
parent a50990e9
......@@ -275,7 +275,7 @@ else {
$starttime = $oldres->start() unless( defined( $options{"s"} ) );
$endtime = $oldres->end() unless( defined( $options{"e"} ) );
} else {
usage() if( @ARGV < 2 || !defined( $type ) );
usage() if( @ARGV != 2 || !defined( $type ) );
$pid = shift(@ARGV);
$count = shift(@ARGV);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment