|
From: Zdenek S. <st...@us...> - 2015-12-14 06:01:46
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ipmitool".
The branch, master has been updated
via ac1b3e1d4697e7ffe05a23c20e5575d45de12eda (commit)
from 336b2cb1ab0dbed4dcdfd94d4c2f117594b6d931 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ac1b3e1d4697e7ffe05a23c20e5575d45de12eda
Author: Björn Spruck <bs...@un...>
Date: Sun Dec 13 21:41:14 2015 +0100
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.
diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
index 40f98e7..5ca6466 100644
--- a/lib/ipmi_fru.c
+++ b/lib/ipmi_fru.c
@@ -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')
{
-----------------------------------------------------------------------
Summary of changes:
lib/ipmi_fru.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
hooks/post-receive
--
ipmitool
|