diff options
author | James Feist <james.feist@linux.intel.com> | 2019-07-09 18:35:14 +0300 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2019-07-09 18:35:14 +0300 |
commit | 3c58441c7b5d11ffe5e614684672b16c0c634c2a (patch) | |
tree | cd981555666951cf8bb62eb8bf1898cac20f76d9 /settings | |
parent | d8fc85b7394dc597cbaa7bda13a2594d1a8a929f (diff) | |
download | provingground-3c58441c7b5d11ffe5e614684672b16c0c634c2a.tar.xz |
Fix settings for conflicts with folders
Folder names cannot be the same as file names or we
will get conflicts.
Tested: settingsd no longer had issues on efe3
Change-Id: I057358b8a6f8a0ec98c177be8d7396d726438cc4
Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/include/interface.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/settings/include/interface.hpp b/settings/include/interface.hpp index b7d5525..00f852a 100644 --- a/settings/include/interface.hpp +++ b/settings/include/interface.hpp @@ -17,6 +17,10 @@ constexpr const char *prefix = "/var/lib/phosphor-settings-manager/settings"; +// because some paths collide with others +// i.e. /xyz/openbmc_project/host collides with /xyz/openbmc/host/foo +constexpr const char *trail = "_"; + #include "utils.hpp" #include <fstream> @@ -33,9 +37,9 @@ struct SettingsInterface SettingsInterface(sdbusplus::asio::object_server &objectServer, const std::string &objectPath, const std::string &iface) : objectServer(objectServer), - path(std::make_shared<std::string>(objectPath)) + path(std::make_shared<std::string>(objectPath + trail)) { - interface = objectServer.add_interface(*path, iface); + interface = objectServer.add_interface(objectPath, iface); } ~SettingsInterface() { |