mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
don't spin while waiting for 0 bytes in case BMC lies about how much data is in a FRU
This commit is contained in:
parent
6d77f698f2
commit
87540ecf2a
@ -232,6 +232,13 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
|
||||
tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0];
|
||||
memcpy((frubuf + off), rsp->data + 1, tmp);
|
||||
off += tmp;
|
||||
|
||||
/* sometimes the size returned in the Info command
|
||||
* is too large. return 0 so higher level function
|
||||
* still attempts to parse what was returned */
|
||||
if (tmp == 0 && off < finish)
|
||||
return 0;
|
||||
|
||||
} while (off < finish);
|
||||
|
||||
if (off < finish)
|
||||
|
Loading…
x
Reference in New Issue
Block a user