From b2c68496f3cf64859f3b4c243e9209e42afabe90 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 7 Mar 2009 02:20:03 +0000 Subject: [PATCH] -Give up more quickly on write protected fru git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2846 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index ee9d5b4e6..563e17efc 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2803,6 +2803,9 @@ sub writefru { sleep 1; } ($rc,$text) = fruwrite(0,$newfru,8); + if ($text =~ /rotected/) { + last; + } $writeattempts++; } if($rc) { @@ -2854,6 +2857,9 @@ sub fruwrite { } if($rc != 0) { + if ($code == 0x80) { + $text = "Write protected FRU"; + } if(!$text) { $text = sprintf("unknown response %02x",$code); }