From 317d7cf08eb01f68be66d17bbf5f98888975ebed Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 9 Oct 2015 13:56:38 -0400 Subject: [PATCH] When doing rinv, the message comes out: Recieved incorrect data from BMC. Fix this by checking if the array value is defined, it not return clear;undef --- xCAT-server/lib/xcat/plugins/ipmi.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 7a952b0ac..29c79d199 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -3428,6 +3428,9 @@ sub parsefru { unless (ref $bytes) { return $bytes,undef; } + if (!defined $bytes->[0]) { + return "clear",undef; + } unless ($bytes->[0]==1) { if ($bytes->[0]==0 or $bytes->[0]==0xff) { #not in spec, but probably unitialized, xCAT probably will rewrite fresh return "clear",undef;