defect 4072

This commit is contained in:
lissav 2014-04-16 12:05:04 -04:00
parent f34cc4eddb
commit 2690fa2e1f
8 changed files with 27 additions and 27 deletions

View File

@ -380,7 +380,7 @@ sub processArgs
{
my $gotattrs = 0;
if (defined(@{$::args})) {
if ( defined ($::args) && @{$::args} ) {
@ARGV = @{$::args};
} else {
if ($::command eq "lsdef") {
@ -391,8 +391,9 @@ sub processArgs
return 2;
}
}
if ( scalar(@{$::args}) eq 1 and $::args->[0] eq '-S')
{
if ( defined ($::args) && @{$::args} ) {
if ( scalar(@{$::args}) eq 1 and $::args->[0] eq '-S')
{
if ($::command eq "lsdef") {
push @ARGV, "-t";
push @ARGV, "node";
@ -400,6 +401,7 @@ sub processArgs
} else {
return 2;
}
}
}
if ($::command eq "lsdef") {

View File

@ -232,8 +232,7 @@ sub parse_args
my $args = $request->{arg};
my $gotattrs = 0;
my %opt =();
if (defined(@{$args})) {
if ( defined ($args) && @{$args}) {
@ARGV = @{$args};
} else {
return 2;

View File

@ -624,7 +624,7 @@ sub nimnodeset
my $Sname = xCAT::InstUtils->myxCATname();
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -1800,7 +1800,7 @@ sub chkosimage
my $image_name;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -2267,7 +2267,7 @@ sub mknimimage
my $dump_name;
my $install_dir = xCAT::TableUtils->getInstallDir();
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -5705,7 +5705,7 @@ sub prermnimimage
my @servicenodes = (); # pass back list of service nodes
my %imagedef; # pass back image def hash
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -6215,7 +6215,7 @@ sub rmnimimage
%allsn = %{$nodehash};
}
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -7822,7 +7822,7 @@ sub prenimnodecust
@nodelist = @$nodes;
}
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -8060,7 +8060,7 @@ sub nimnodecust
@nodelist = @$nodes;
}
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -8217,7 +8217,7 @@ sub prenimnodeset
my $subreq = shift;
my $error = 0;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -9944,7 +9944,7 @@ sub define_SN_resource
}
my %attrs;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -10983,7 +10983,7 @@ sub mkdsklsnode
# - just set global for now
$::callback = $callback;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -12993,7 +12993,7 @@ sub make_SN_resource
}
my %attrs;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -13653,7 +13653,7 @@ sub prermdsklsnode
{
my $callback = shift;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}
@ -13763,7 +13763,7 @@ sub rmdsklsnode
# - just set global for now
$::callback = $callback;
if (defined(@{$::args}))
if ( defined ($::args) && @{$::args} )
{
@ARGV = @{$::args};
}

View File

@ -1332,7 +1332,7 @@ sub fpc_firmxfer_watch {
return;
}
my $percent = 0;
if ($rsp->{data} and (length(@{$rsp->{data}}) > 0)) {
if ($rsp->{data} and (scalar(@{$rsp->{data}}) > 0)) {
$percent = $rsp->{data}->[0];
}
#$callback->({sinfo=>"$percent%"});

View File

@ -3563,8 +3563,7 @@ sub create_error_response {
#-----------------------------------------------------------------------------
sub lskit_processargs {
if ( defined( @{$::args} ) ) {
if ( defined ($::args) && @{$::args} ){
@ARGV = @{$::args};
}
@ -3665,7 +3664,7 @@ sub lskit_processargs {
#-----------------------------------------------------------------------------
sub lskitcomp_processargs {
if ( defined( @{$::args} ) ) {
if ( defined ($::args) && @{$::args} ){
@ARGV = @{$::args};
}
@ -3758,7 +3757,7 @@ sub lskitcomp_processargs {
#-----------------------------------------------------------------------------
sub lskitdeployparam_processargs {
if ( defined( @{$::args} ) ) {
if ( defined ($::args) && @{$::args} ){
@ARGV = @{$::args};
}

View File

@ -192,7 +192,7 @@ sub lskmodules_usage {
#-----------------------------------------------------------------------------
sub processArgs {
if ( defined( @{$::args} ) ) {
if ( defined ($::args) && @{$::args} ) {
@ARGV = @{$::args};
}

View File

@ -250,7 +250,7 @@ sub runrollupdate_usage {
sub processArgs {
my $gotattrs = 0;
if ( defined( @{$::args} ) ) {
if ( defined ($::args) && @{$::args} ) {
@ARGV = @{$::args};
}
else {

View File

@ -199,7 +199,7 @@ sub prexcat2nim
my @nodelist=(); # pass back list of nodes - if applicable
my @servicenodes=(); # pass back list of service nodes - if applicable
if (defined(@{$::args})) {
if ( defined ($::args) && @{$::args} ) {
@ARGV = @{$::args};
} else {
&xcat2nim_usage($callback);
@ -359,7 +359,7 @@ sub processArgs
my $gotattrs = 0;
if (defined(@{$::args})) {
if ( defined ($::args) && @{$::args} ) {
@ARGV = @{$::args};
} else {
return 3;