2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

Merge pull request #3439 from zet809/fix_issue_3420

Fix issue 3420: Changes required to support more detailed firmware in…
This commit is contained in:
Victor Hu 2017-07-12 14:30:30 -04:00 committed by GitHub
commit dcab93362a

View File

@ -1610,9 +1610,12 @@ sub isfpc {
sub isopenpower {
my $sessdata = shift;
if ($sessdata->{prod_id} == 43707 and $sessdata->{mfg_id} == 0) {
# mft_id 0 and prod_id 43707 is for Firestone,Minsky
return 1;
}
else {
} elsif (($sessdata->{prod_id} == 0 or $sessdata->{prod_id} == 2355) and $sessdata->{mfg_id} == 10876) {
# mfg_id 10876 is for Supermicro, prod_id 2355 for B&S, and 0 for Boston
return 1;
} else {
return 0;
}
}
@ -3971,7 +3974,7 @@ sub add_fruhash {
$fru->rec_type("hw");
}
$fru->value($err);
if (exists($sessdata->{currfrusdr})) {
if ($sessdata->{currfrusdr}) {
$fru->desc($sessdata->{currfrusdr}->id_string);
}
if (exists($sessdata->{frudex})) {
@ -4214,6 +4217,9 @@ sub parsefru {
return "Unrecognized FRU format", undef;
}
}
elsif (!$bytes->[1] and !$bytes->[2] and !$bytes->[3] and !$bytes->[4] and !$bytes->[5]) {
return "No data available", undef;
}
if ($bytes->[1]) { #The FRU spec, unfortunately, gave no easy way to tell the size of internal area
#consequently, will find the next defined field and preserve the addressing and size of current FRU
#area until then