commit | 97014f50fe6ad6e1b283e2a2b93e20401a6b54fd | [log] [tgz] |
---|---|---|
author | Duke Du <Duke.Du@quantatw.com> | Thu Dec 16 17:21:01 2021 +0800 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Thu Jan 06 23:22:38 2022 +0000 |
tree | 3ad921ae738b7dec022efdff869295eb932c6168 | |
parent | d385b5a6c358a3664bf97634aa50d558d0cbd4e3 [diff] |
Fix "ID String Type/Length Code" byte for get sdr command Root cause : Currently, the byte of "Type/Length Code" for dbus-sdr get sdr record command is incorrect when the length of sensor name is longer than 16 bytes. The suffix of the sensor name would be replace with blank and resize the sensor name with FULL_RECORD_ID_STR_MAX_LENGTH. Due to this reason the "Type/Length Code" would record incorrect data 0x10 (i.e. 16 bytes length sensor ID string). Solution : Resizing the sensor name when it is still longer than 16 bytes after replacing the suffix with blank. Example : Sensor Name = cpu0_pvccd_hv_Temperature The result of getting SDR record without this change. e4 00 e3 00 51 01 3b 20 00 e3 07 2f 00 68 01 01 85 32 85 32 1b 1b 80 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 5f 5a 00 00 03 00 00 00 00 00 10 63 70 75 30 20 70 76 63 63 64 20 68 76 00 00 00 The result of getting SDR record with this change. c2 00 c1 00 51 01 3b 20 00 c1 07 2f 00 68 01 01 85 32 85 32 1b 1b 80 01 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 5f 5a 00 00 03 00 00 00 00 00 0d 63 70 75 30 20 70 76 63 63 64 20 68 76 00 00 00 Resize code reference: https://github.com/openbmc/phosphor-host-ipmid/blob/master/dbus-sdr/sensorcommands.cpp#L445 Signed-off-by: Duke Du <Duke.Du@quantatw.com> Change-Id: I63b81f5a54466318b25099d9496fc7796ab06752
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.