summaryrefslogtreecommitdiffstats
path: root/sensor_gen.py
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-08-29 21:12:01 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-09-02 20:23:44 +0530
commit2c1291325d9c6f5cd24c9a98b86154ade667328f (patch)
treeadbf26a13d0d50bce4d51196de838260fc3f4b6b /sensor_gen.py
parent18dc1281fe5af83c1dbb9c8895d7af824d2c1856 (diff)
downloadopenpower-occ-control-2c1291325d9c6f5cd24c9a98b86154ade667328f.tar.gz
openpower-occ-control-2c1291325d9c6f5cd24c9a98b86154ade667328f.zip
Seek to file offset 0 after reading error file
For a fd watching for data in sysfs file, a poll would return immediately after read unless file is closed and re-opened OR stream is seeked to 0. This commit chooses latter. From stackoverflow: Once poll/select indicates that the value has changed, you need to close and re-open the file, or seek to 0 and read again. Also, use EPOLLPRI | EPOLLERR than EPOLLIN as needed by sysfs_inotify Change-Id: I243cdfd9a09c567eac5e52abd9980ebf90b94f89 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'sensor_gen.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud