diff options
author | Patrick Venture <venture@google.com> | 2018-12-28 07:32:36 -0800 |
---|---|---|
committer | Alexander Amelkin <mocbuhtig@amelkin.msk.ru> | 2019-02-13 21:28:14 +0300 |
commit | eb5f26060a306d4efc44dd6e603f2ccb88c78f91 (patch) | |
tree | 8da2a26c534dbea40498e8ad35d6f33e71a6c89c | |
parent | feecd2bbf40c8c78cfce88ac2966e926b60362c4 (diff) | |
download | ipmitool-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>
-rw-r--r-- | lib/ipmi_fru.c | 2 |
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); |