Skip to content

–Consider the case where there is no board or product domain #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zengjuxiang
Copy link

Consider the case where there is no board or product domain。

@zengjuxiang zengjuxiang marked this pull request as draft January 11, 2021 08:53
Copy link
Author

@zengjuxiang zengjuxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the following case, The second command( fru edit 0 field b 2 SA0531) breaks fru data, causing fru print cannot display correctly.

1) ipmitool -I lanplus -H 100.2.76.176 -U admin -P admin fru print 0 //in this case, fru only have Board domain.
Board Mfg Date : Wed Dec 2 15:20:00 2020
Board Mfg : Inspur
Board Product : Riser
Board Serial : 0
Board Part Number : YZRI-01647-101

2) ipmitool -I lanplus -H XXXX -U xxx -P xxx fru edit 0 field b 2 SA0531
String size are not equal, resizing fru to fit new string
Read All FRU area
Fru Size : 256 bytes
Copy to new FRU
Section Length: 40
Padding Length: 0
NumByte Change: 4
Start SecChnge: c2
End SecChnge : 49
Start Section : 1
End Sec wo Pad: c1
End Section : 2a
New Padding Length: -4
change_size_by_8: 1
New Padding Length: 4
change_size_by_8: 1
header.offset.board: 1
Moving Section Product, from 0 to 8
Change multi offset from 0 to 1
Moving Remaining Bytes (Multi-Rec , etc..), from 0 to 8
Updating Field : '0 ' with 'SA0531' ... (Length from '194' to '198')
Copying remaining of sections: 21
Calculate New Checksum: ffffffca
Writing new FRU.
Done.

3) ipmitool -I lanplus -H 100.2.76.176 -U admin -P admin fru print 0 //nothing can display

4)The reason is that only board domain is not considered in frutool, and the solution can refer to the pull request code.

@zengjuxiang zengjuxiang marked this pull request as ready for review January 11, 2021 08:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant