From eb5f26060a306d4efc44dd6e603f2ccb88c78f91 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Fri, 28 Dec 2018 07:32:36 -0800 Subject: [PATCH] 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 --- lib/ipmi_fru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);