From 3eec0c921dbcf4611c171780019214a7c374d6bf Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 18 Nov 2014 03:49:37 -0500 Subject: [PATCH] fix bug 4206: lsvm return null if the cec is in off state --- perl-xCAT/xCAT/FSPvm.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/FSPvm.pm b/perl-xCAT/xCAT/FSPvm.pm index b31b4e942..d48a06389 100644 --- a/perl-xCAT/xCAT/FSPvm.pm +++ b/perl-xCAT/xCAT/FSPvm.pm @@ -1971,12 +1971,24 @@ sub query_cec_info { } my $rethash = query_cec_info_actions($request, $name, $d, $usage, ["part_get_lpar_processing","part_get_lpar_memory","part_get_all_io_bus_info","part_get_all_vio_info","get_huge_page","get_cec_bsr"], \%tmp_hash); #push @result, [$name, $rethash, 0]; - push @result, @$rethash; + #push @result, @$rethash; + if (scalar (@$rethash)) { + push @result, @$rethash; + } else { + push @result, [$name, "No information got", -1]; + last; + } $lpar_hash{$name} = \%tmp_hash; $lpar_hash{$name}->{parent} = @$d[3]; } if (@td[0] == 0) { my $rethash = query_cec_info_actions($request, @td[3],\@td, $usage); + if (scalar (@$rethash)) { + push @result, @$rethash; + } else { + push @result, [@td[3], "No information got", -1]; + last; + } #push @result, [@td[3], $rethash, 0]; push @result, @$rethash; }