From 646a9a33532805134605594e89021bc0ac69dc13 Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 19 Sep 2011 10:16:17 +0000 Subject: [PATCH] Proposal from defect SW098533,the header is confusing and there should not be any data returned when there is no gard records git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10550 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPinv.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/FSPinv.pm b/perl-xCAT/xCAT/FSPinv.pm index 7fbdd7e0f..30124b601 100644 --- a/perl-xCAT/xCAT/FSPinv.pm +++ b/perl-xCAT/xCAT/FSPinv.pm @@ -282,17 +282,18 @@ sub deconfig { #print Dumper($decfg); my $node = $decfg->{NODE}; if( defined($node) && exists($node->{Location_code}) ) { - push @result,[$name,"Deconfigured resources", 0]; - push @result,[$name,"Location_code RID Call_Out_Method Call_Out_Hardware_State TYPE", 0]; - push @result,[$name,"$node->{Location_code} $node->{RID}", 0]; my $Call_Out_Hardware_State ; my $Call_Out_Method; my $Location_code; my $RID; my $TYPE; if(ref($node->{GARDRECORD}) ne "ARRAY") { + push @result,[$name,"NO Deconfigured resources", 0]; return( \@result ); } + push @result,[$name,"Deconfigured resources", 0]; + push @result,[$name,"Location_code RID Call_Out_Method Call_Out_Hardware_State TYPE", 0]; + push @result,[$name,"$node->{Location_code} $node->{RID}", 0]; foreach my $unit(@{$node->{GARDRECORD}}) { while (my ($key, $unit3) = each(%$unit) ) {