You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi, recently I found when using command ipmitool fru edit <fruid> field <section> <index> <string> to modify the fru Chassis/Board/Product section, the fru edit command may also update the MultiRecord area offset even if the MultiRecord is not present (offset is 00).
IPMITOOL Version
$ ipmitool -V
ipmitool version 1.8.19.1.g4519b4b
To Reproduce
Steps to reproduce the behavior:
Modify the FRU field by ipmitool
root:~$ ipmitool fru edit 0 field p 1 ABC
String size are not equal, resizing fru to fit new string
Read All FRU area
Fru Size : 512 bytes
Copy to new FRU
Section Length: 72
Padding Length: 1
NumByte Change: 2
Start SecChnge: c1
End SecChnge : 36
Start Section : 1
End Sec wo Pad: c1
End Section : 81
New Padding Length: -1
change_size_by_8: 1
New Padding Length: 7
change_size_by_8: 1
header.offset.board: 7
Change multi offset from 0 to 1
Moving Remaining Bytes (Multi-Rec , etc..), from 200 to 208
Updating Field :'' with 'ABC' ... (Length from '193' to '195')
Copying remaining of sections: 60
Calculate New Checksum: ffffffc5
Writing new FRU.
Done.
The MultiRecord offset in those the common header would be modified to 1 according to log Change multi offset from 0 to 1
Expected behavior
If the MultiRecord is not present, the offset of this section should remain 00.
Additional context
The text was updated successfully, but these errors were encountered:
Originally, ipmitool will assume the FRU section offset will follow a specific order, but this is not true (or not be defined in IPMI FRU SPEC). So change the FRU edit method, now it will:
- Calculate the section offset one by one according to their offset
- Ignore the FRU section offset if its offset is 00 (area does not exist)
- If the new FRU become smaller, reset the redundant data to 0
Fixesipmitool#364
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Hi, recently I found when using command
ipmitool fru edit <fruid> field <section> <index> <string>
to modify the fru Chassis/Board/Product section, the fru edit command may also update the MultiRecord area offset even if the MultiRecord is not present (offset is 00).IPMITOOL Version
To Reproduce
Steps to reproduce the behavior:
Change multi offset from 0 to 1
Expected behavior
If the MultiRecord is not present, the offset of this section should remain 00.
Additional context
The text was updated successfully, but these errors were encountered: