ID:404 - Edit FRU information update problem

Targets as a problem with editing FRUs (like ipmitool ....
fru edit 0 field b 0 "blahblah") where the header (multirecord area offset) is
not correctly updated.

It is supposed to modify the header offset to muti-record area if any of
the three previous areas has been edited.

Remark: this has to occur before the new header crc is calculated.
Thats the reson the modification is not close to the actual movement of the
data. Maybe it would be nicer to change the order in the code here. But
I do not want to add undesired behaviour, thus keeping a clear and small
patch.
This commit is contained in:
Björn Spruck 2015-12-13 21:41:14 +01:00 committed by Zdenek Styblik
parent 336b2cb1ab
commit ac1b3e1d46

View File

@ -5042,6 +5042,11 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
header.offset.product += change_size_by_8;
}
if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
header.offset.multi += change_size_by_8;
}
/* Adjust length of the section */
if (f_type == 'c')
{