summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--occ_device.hpp4
-rw-r--r--occ_status.hpp8
3 files changed, 5 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index ebad384..149e0d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,7 @@ AS_IF([test "x$OCC_NAME" == "x"], [OCC_NAME="occ"])
AC_DEFINE_UNQUOTED([OCC_NAME], ["$OCC_NAME"], [The OCC object name])
AC_ARG_VAR(OCC_MASTER_NAME, [The OCC master object name])
-AS_IF([test "x$OCC_MASTER_NAME" == "x"], [OCC_MASTER_NAME="occ1-dev0"])
+AS_IF([test "x$OCC_MASTER_NAME" == "x"], [OCC_MASTER_NAME="occ-hwmon.1"])
AC_DEFINE_UNQUOTED([OCC_MASTER_NAME], ["$OCC_MASTER_NAME"], [The OCC master object name])
AC_ARG_VAR(OCC_HWMON_PATH, [The OCC hwmon path])
diff --git a/occ_device.hpp b/occ_device.hpp
index 2ca94f5..efa46dc 100644
--- a/occ_device.hpp
+++ b/occ_device.hpp
@@ -41,11 +41,7 @@ class Device
const Manager& manager,
Status& status,
std::function<void(bool)> callBack = nullptr) :
-#ifdef I2C_OCC
config(name),
-#else
- config(name + '-' + "dev0"),
-#endif
errorFile(fs::path(config) / "occ_error"),
statusObject(status),
error(event, errorFile, callBack),
diff --git a/occ_status.hpp b/occ_status.hpp
index d88ef6b..f14bd7d 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -30,6 +30,9 @@ using instanceID = int;
// IPMI sensor ID for a given OCC instance
using sensorID = uint8_t;
+// OCC sysfs name prefix
+const std::string sysfsName = "occ-hwmon";
+
/** @class Status
* @brief Implementation of OCC Active Status
*/
@@ -67,7 +70,7 @@ class Status : public Interface
#ifdef I2C_OCC
i2c_occ::getI2cDeviceName(path),
#else
- name + std::to_string(instance + 1),
+ sysfsName + "." + std::to_string(instance + 1),
#endif
manager,
*this,
@@ -139,9 +142,6 @@ class Status : public Interface
*/
std::function<void(bool)> callBack;
- /** @brief occ name prefix */
- std::string name = OCC_NAME;
-
/** @brief OCC instance number. Ex, 0,1, etc */
int instance;
OpenPOWER on IntegriCloud