Add occ_ prefix for i2c occ dbus objects
I2c occ dbus objects path were their i2c addresses, e.g. 3_0050.
This does not indicate it's occ objects, and it does not work with
op-occ-disable/enable services, which searches "occ" key words in object
path.
So add "occ_" prefix for i2c occ dbus objects, e.g. occ_3_0050, to
indicate it's occ objects and work well with op-occ-disable/enable
services.
Change-Id: I21712f2fb7cf6138248f6986b84f99c90c3fa3a2
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/occ_manager.cpp b/occ_manager.cpp
index df53f7d..8b99b1f 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -126,12 +126,13 @@
for (auto& name : deviceNames)
{
i2c_occ::i2cToDbus(name);
+ name = std::string(OCC_NAME) + '_' + name;
auto path = fs::path(OCC_CONTROL_ROOT) / name;
statusObjects.emplace_back(
- std::make_unique<Status>(
- bus,
- event,
- path.c_str()));
+ std::make_unique<Status>(
+ bus,
+ event,
+ path.c_str()));
}
}
#endif