OSDN Git Service
libsensors: correct read() usage
The readEvents() implementation would attempt to read buffer_len (two
by default) IIO events from the device, but would only ever process
one, leading to dropped events in the case of overflow. It was also
not checking the return value from read and would push garbage data on
I/O errors (probably would not happen in regular usage, but IIO
devices are known to return -EBUSY or -EINVAL if there are other users
or if the sysfs parameters are set incorrectly).
Change-Id: I7f66f530c9fce0540f1596456b3ca191406bbd27
For: AXIA-3287
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Reviewed-on: https://otc-android.intel.com/gerrit/22150
Reviewed-by: Daniel Leung <daniel.leung@intel.com>
Reviewed-by: Russell Webb <russell.webb@intel.com>
Tested-by: jenkins autobuilder