git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1096 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
4c6912abc1
commit
8ebb907eed
@ -22,8 +22,8 @@ sub parse_args {
|
||||
# Responds with usage statement
|
||||
#############################################
|
||||
local *usage = sub {
|
||||
my $usage_string=xCAT::Usage->getUsage($command);
|
||||
return( [ $_[0], $usage_string]);
|
||||
my $usage_string = xCAT::Usage->getUsage($command);
|
||||
return( [ $_[0], $usage_string] );
|
||||
};
|
||||
#############################################
|
||||
# Process command-line arguments
|
||||
@ -56,10 +56,10 @@ sub parse_args {
|
||||
if ( !defined( $cmd )) {
|
||||
|
||||
################################
|
||||
# Check for non-zero integer
|
||||
# Check for non-zero integer
|
||||
################################
|
||||
if ( $ARGV[0] !~ /^[1-9]{1}$|^[1-9]{1}[0-9]+$/ ) {
|
||||
return(usage( "Invalid command: $ARGV[0]" ));
|
||||
if ( $ARGV[0] !~ /^([1-9]{1}|[1-9]{1}[0-9]+)$/ ) {
|
||||
return(usage( "Invalid entry count: $ARGV[0]" ));
|
||||
}
|
||||
$cmd = "entries";
|
||||
$opt{e} = $ARGV[0];
|
||||
|
Loading…
Reference in New Issue
Block a user