summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-28 07:32:36 -0800
committerAlexander Amelkin <mocbuhtig@amelkin.msk.ru>2019-02-13 21:28:14 +0300
commiteb5f26060a306d4efc44dd6e603f2ccb88c78f91 (patch)
tree8da2a26c534dbea40498e8ad35d6f33e71a6c89c /lib
parentfeecd2bbf40c8c78cfce88ac2966e926b60362c4 (diff)
downloadipmitool-eb5f26060a306d4efc44dd6e603f2ccb88c78f91.tar.gz
fru: Fix write chunk reduction code
Check against FRU_AREA_MAXIMUM_BLOCK_SZ instead of FRU_BLOCK_SZ when checking if the write chunk needs to be reduced. Apparently, that was the original intention, and then there was just a typo. In other places the same check is done properly. Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ipmi_fru.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
index 8b54580..89e674c 100644
--- a/lib/ipmi_fru.c
+++ b/lib/ipmi_fru.c
@@ -610,7 +610,7 @@ write_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
}
if (fru_cc_rq2big(rsp->ccode)) {
- if (fru->max_write_size > FRU_BLOCK_SZ) {
+ if (fru->max_write_size > FRU_AREA_MAXIMUM_BLOCK_SZ) {
fru->max_write_size -= FRU_BLOCK_SZ;
lprintf(LOG_INFO, "Retrying FRU write with request size %d",
fru->max_write_size);