fru-device: use off_t/size_t for FRU IO offsets & lengths

While the 8-bit and 16-bit types that had been used for these were
adequate for the small devices typically used for most FRU EEPROMs, some
do get within striking distance of the limits of 16-bit types, and we
might as well use the more "natural" types that are intended for these
sorts of parameters, which avoid the risk of range problems and signal
intent more clearly & explicitly.

Tested: on an ASRock Rack romed8hm3, fru-device successfully recognizes
and parses the baseboard FRU EEPROM as it did prior to this patch.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I38251fec2857923356d324e01af77795186560eb
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 620da6e..ec42eca 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -116,9 +116,9 @@
     }
 }
 
-static int64_t readFromEeprom(int flag __attribute__((unused)), int fd,
+static ssize_t readFromEeprom(int flag __attribute__((unused)), int fd,
                               uint16_t address __attribute__((unused)),
-                              uint16_t offset, uint8_t len, uint8_t* buf)
+                              off_t offset, size_t len, uint8_t* buf)
 {
     auto result = lseek(fd, offset, SEEK_SET);
     if (result < 0)
@@ -256,8 +256,8 @@
     return (ret == SMBUS_IOCTL_WRITE_THEN_READ_MSG_COUNT) ? msgs[1].len : -1;
 }
 
-static int64_t readBlockData(int flag, int file, uint16_t address,
-                             uint16_t offset, uint8_t len, uint8_t* buf)
+static ssize_t readBlockData(int flag, int file, uint16_t address, off_t offset,
+                             size_t len, uint8_t* buf)
 {
     if (flag == 0)
     {