| commit | ec912e6c0de2ff32c895ef681958052e0039e64f | [log] [tgz] |
|---|---|---|
| author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Wed Dec 15 22:47:51 2021 -0600 |
| committer | Santosh Puranik <santosh.puranik@in.ibm.com> | Fri Dec 17 09:38:10 2021 +0000 |
| tree | e885589441513d266e3b7d7fb1fd806eaef16bf1 | |
| parent | 6aa5450e3c6e55523c66f35c72e2c4f5d4251b43 [diff] |
Defect SW541296:vpd-tool write failure
vpd-tool write option failed to write the given input.
<The iostream::eof flag is set only by all standard input operations
when the End-of-File is reached.>
Here the issue was, the string stream's eof bit got set to true only
after a read beyond the last character in the stream. This made to loop
for (stream_length+1) times, which appends the last character twice in
the vector buffer.
This commit has the fix for it - by looping around the stream only
for the actual length of the stream.
Test:Tested on everest
1.
root@ever27bmc:/tmp# ./vpd-tool -r -O /system/chassis/motherboard/dasd_backplane/panel1 -R VINI -K DR
{
"/system/chassis/motherboard/dasd_backplane/panel1": {
"DR": "CEC OP PANEL LCD"
}
}
root@ever27bmc:/tmp# ./vpd-tool -w -O /system/chassis/motherboard/dasd_backplane/panel1 -R VINI -K DR -V 0x3132
root@ever27bmc:/tmp# ./vpd-tool -r -O /system/chassis/motherboard/dasd_backplane/panel1 -R VINI -K DR
{
"/system/chassis/motherboard/dasd_backplane/panel1": {
"DR": "12C OP PANEL LCD"
}
}
2.
root@ever27bmc:/tmp# ./vpd-tool -w -O /system/chassis/motherboard/dasd_backplane/panel1 -R VINI -K DR -V 0x61yy
Provide a valid hexadecimal input.
3.
root@ever27bmc:/tmp# ./vpd-tool -w -O /system/chassis/motherboard/dasd_backplane/panel1 -R VINI -K DR -V 0x61A
VPD-TOOL write option accepts 2 digit hex numbers. (Eg. 0x1 should be given as 0x01). Aborting the write operation.
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: I86096e7f21ba306094e517e84ce270f40cf51794
This repository hosts code for OpenPower and IBM IPZ format VPD parsers. Both OpenPower VPD and IPZ VPD formats are structured binaries that consist of records and keywords. A record is a collection of multiple keywords. More information about the format can be found here.
The repository consists of two distinct applications, which are:
This is a build-time YAML driven application that parses the OpenPower VPD format and uses the YAML configuration (see extra-properties-example.yaml and writefru.yaml) to determine:
The application instance must be passed in the file path to the VPD (this can, for example, be a sysfs path exposed by the EEPROM device driver) and also the D-Bus object path(s) that EEPROM data needs to be published under.
This parser is can be built by passing in the --enable-ibm-parser configure option. This parser differs from the OpenPower VPD parser in the following ways:
# and are > 255 bytes in length).Making the application runtime JSON driven allows us to support multiple systems (with different FRU configurations) to be supported in a single code image as well as making the application more flexible for future improvements.