summaryrefslogtreecommitdiffstats
path: root/mainloop.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-12-14 10:22:22 -0600
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-01-17 01:11:14 +0000
commitc8a8e0102e1bb9dd1e231f809e6327513eea3559 (patch)
treef45286f2a2fbb828ce105c618b6a39af755240bb /mainloop.cpp
parent26d21731c292a02ec71480fade9a06658160eafb (diff)
downloadphosphor-hwmon-c8a8e0102e1bb9dd1e231f809e6327513eea3559.tar.gz
phosphor-hwmon-c8a8e0102e1bb9dd1e231f809e6327513eea3559.zip
Clear errno before reading/writing
Ensure the errno is cleared before accessing the sysfs file, so exceptions thrown without setting an errno can be recognized as such. Without this, the errno could still be set to a nonzero value from a previous operation, and the error handling code would think it happened on the current operation. The difference being if there is a nonzero errno a Read/WriteFailure error will be logged, and if zero the exception will be rethrown. Change-Id: Ia958376ca80484d4d594872ab8ab0154d1b767ca Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'mainloop.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud