frudevice: use non-magic maximum read value
Instead of using 0x20 for the maximum byte read count, use the non-magic
kernel header provided value.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I67759776e7b6b5f8e94664e68a4082fe16c64b99
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 1cd1acb..a830c94 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -268,7 +268,7 @@
while (length > 0)
{
- auto to_get = std::min(0x20, length);
+ auto to_get = std::min(I2C_SMBUS_BLOCK_MAX, length);
if (readFromEeprom(file, area_offset, static_cast<uint8_t>(to_get),
block_data.data()) < 0)
@@ -452,7 +452,7 @@
while (length > 0)
{
- auto to_get = std::min(0x20, length);
+ auto to_get = std::min(I2C_SMBUS_BLOCK_MAX, length);
if (read_block_data(flag, file, area_offset,
static_cast<uint8_t>(to_get),