Log failing path after sysfs access failures

Log failing device path and error after a sysfs access failure.
Gracefully exit rather than crash.

Change-Id: I41316e84a70ceda8c166f31ab3269f97978da3ab
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/sysfs.hpp b/sysfs.hpp
index 8f09e03..c38ed9e 100644
--- a/sysfs.hpp
+++ b/sysfs.hpp
@@ -40,4 +40,22 @@
  */
 std::string findHwmon(const std::string& ofNode);
 
+/** @brief Read an hwmon sysfs value.
+ *
+ *  Calls exit(3) with bad status on failure.
+ *
+ *  @param[in] root - The hwmon class root.
+ *  @param[in] instance - The hwmon instance (ex. hwmon1).
+ *  @param[in] type - The hwmon type (ex. temp).
+ *  @param[in] id - The hwmon id (ex. 1).
+ *  @param[in] sensor - The hwmon sensor (ex. input).
+ *
+ *  @returns - The read value.
+ */
+int readSysfsWithCallout(const std::string& root,
+                         const std::string& instance,
+                         const std::string& type,
+                         const std::string& id,
+                         const std::string& sensor);
+
 // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4