From a944d432b2b6a7dad267d4f049741f126a49a83b Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Wed, 19 Jul 2017 17:53:44 -0500 Subject: Call mapper service with appropriate parameters I obviously did not re-test my code after making this review comment. The parameters to getService() were in the wrong order. Resolves openbmc/openbmc#1990 Change-Id: Ia0cfe45f391d80dec6f47b28b99126bfc98f2d28 Signed-off-by: Andrew Geissler --- dcmihandler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dcmihandler.cpp b/dcmihandler.cpp index 43c27f8..9205207 100644 --- a/dcmihandler.cpp +++ b/dcmihandler.cpp @@ -15,7 +15,6 @@ using InternalFailure = void register_netfn_dcmi_functions() __attribute__((constructor)); -constexpr auto PCAP_SETTINGS_SERVICE = "xyz.openbmc_project.Settings"; constexpr auto PCAP_PATH = "/xyz/openbmc_project/control/host0/power_cap"; constexpr auto PCAP_INTERFACE = "xyz.openbmc_project.Control.Power.Cap"; @@ -27,7 +26,7 @@ using namespace phosphor::logging; uint32_t getPcap(sdbusplus::bus::bus& bus) { auto settingService = ipmi::getService(bus, - PCAP_PATH,PCAP_SETTINGS_SERVICE); + PCAP_INTERFACE,PCAP_PATH); auto method = bus.new_method_call(settingService.c_str(), PCAP_PATH, @@ -53,7 +52,7 @@ uint32_t getPcap(sdbusplus::bus::bus& bus) bool getPcapEnabled(sdbusplus::bus::bus& bus) { auto settingService = ipmi::getService(bus, - PCAP_PATH,PCAP_SETTINGS_SERVICE); + PCAP_INTERFACE,PCAP_PATH); auto method = bus.new_method_call(settingService.c_str(), PCAP_PATH, @@ -76,8 +75,8 @@ bool getPcapEnabled(sdbusplus::bus::bus& bus) return sdbusplus::message::variant_ns::get(pcapEnabled); } -ipmi_ret_t ipmi_dcmi_get_power_limit(ipmi_netfn_t netfn, ipmi_cmd_t cmd, - ipmi_request_t request, ipmi_response_t response, +ipmi_ret_t ipmi_dcmi_get_power_limit(ipmi_netfn_t netfn, ipmi_cmd_t cmd, + ipmi_request_t request, ipmi_response_t response, ipmi_data_len_t data_len, ipmi_context_t context) { // Default to no power cap enabled -- cgit v1.2.1