summaryrefslogtreecommitdiffstats
path: root/utility.cpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2018-05-10 13:18:51 -0500
committerMatthew Barth <msbarth@us.ibm.com>2018-05-17 12:13:36 -0500
commitf3adb7827b1b153b2e2d12d432a67deff95ee5e3 (patch)
treef2760ef3b1c6f96223080e7f2d581b62e6ee2ba9 /utility.cpp
parent1af90f09ea490cac195c734a1ff52546f93a5d76 (diff)
downloadphosphor-fan-presence-f3adb7827b1b153b2e2d12d432a67deff95ee5e3.tar.gz
phosphor-fan-presence-f3adb7827b1b153b2e2d12d432a67deff95ee5e3.zip
utility: Remove getService function
The getService function is no longer used and is not necessary with the getService function within sdbusplus.hpp Tested: N/A Change-Id: Ifad8ec1efb64508923d4f5c42bef318f0b03124c Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'utility.cpp')
-rw-r--r--utility.cpp46
1 files changed, 1 insertions, 45 deletions
diff --git a/utility.cpp b/utility.cpp
index 1bb979e..08970d3 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <string>
#include "utility.hpp"
namespace phosphor
@@ -22,50 +21,7 @@ namespace fan
{
namespace util
{
-
-using namespace std::string_literals;
-
-using namespace phosphor::logging;
-using InternalFailure = sdbusplus::xyz::openbmc_project::Common::
- Error::InternalFailure;
-
-std::string getService(const std::string& path,
- const std::string& interface,
- sdbusplus::bus::bus& bus)
-{
- auto mapperCall = bus.new_method_call(MAPPER_BUSNAME,
- MAPPER_PATH,
- MAPPER_INTERFACE,
- "GetObject");
-
- mapperCall.append(path);
- mapperCall.append(std::vector<std::string>({interface}));
-
- auto mapperResponseMsg = bus.call(mapperCall);
- if (mapperResponseMsg.is_method_error())
- {
- log<level::ERR>("Error in mapper call to get service name",
- entry("PATH=%s", path.c_str()),
- entry("INTERFACE=%s", interface.c_str()));
- elog<InternalFailure>();
- }
-
-
- std::map<std::string, std::vector<std::string>> mapperResponse;
- mapperResponseMsg.read(mapperResponse);
-
- if (mapperResponse.empty())
- {
- log<level::ERR>(
- "Error in mapper response for getting service name",
- entry("PATH=%s", path.c_str()),
- entry("INTERFACE=%s", interface.c_str()));
- elog<InternalFailure>();
- }
-
- return mapperResponse.begin()->first;
-}
-
+ // Keep for future functions
}
}
}
OpenPOWER on IntegriCloud