summaryrefslogtreecommitdiffstats
path: root/systemintfcmds.cpp
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-05-02 13:54:35 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-19 14:32:05 +0000
commitf0f496c11835d07bab6957aee6f8da61116821cb (patch)
treed8676b179e7bd4daacbb0b53d81671e9cea8f7fb /systemintfcmds.cpp
parent12c2db7947bf20f683950347e06a36bea1991d37 (diff)
downloadphosphor-host-ipmid-f0f496c11835d07bab6957aee6f8da61116821cb.tar.gz
phosphor-host-ipmid-f0f496c11835d07bab6957aee6f8da61116821cb.zip
Update softoff to support new host control interface
The new host control design requires applications use its new dbus interfaces to interact with the host. This commit moves the softoff application over to this new interface. Change-Id: I3c6830a59d72df1f112ee7a63a08bfca53375bf7 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'systemintfcmds.cpp')
-rw-r--r--systemintfcmds.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/systemintfcmds.cpp b/systemintfcmds.cpp
index b101016..60961d3 100644
--- a/systemintfcmds.cpp
+++ b/systemintfcmds.cpp
@@ -13,46 +13,6 @@ using namespace sdbusplus::xyz::openbmc_project::Control::server;
// Internal function to get next host command
Host::Command getNextHostCmd();
-// Notify SofPowerOff application that host is responding to command
-void notifySoftOff()
-{
-
- constexpr auto iface = "org.freedesktop.DBus.Properties";
- constexpr auto soft_off_iface = "xyz.openbmc_project.Ipmi.Internal."
- "SoftPowerOff";
-
- constexpr auto property = "ResponseReceived";
- constexpr auto value = "xyz.openbmc_project.Ipmi.Internal."
- "SoftPowerOff.HostResponse.SoftOffReceived";
- char *busname = nullptr;
-
- // Get the system bus where most system services are provided.
- auto bus = ipmid_get_sd_bus_connection();
-
- // Nudge the SoftPowerOff application that it needs to stop the
- // initial watchdog timer. If we have some errors talking to Soft Off
- // object, get going and do our regular job
- mapper_get_service(bus, SOFTOFF_OBJPATH, &busname);
- if (busname)
- {
- // No error object or reply expected.
- auto r = sd_bus_call_method(bus, busname, SOFTOFF_OBJPATH, iface,
- "Set", nullptr, nullptr, "ssv",
- soft_off_iface, property, "s", value);
- if (r < 0)
- {
- fprintf(stderr, "Failed to set property in SoftPowerOff object: %s\n",
- strerror(-r));
- }
- free (busname);
- }
- else
- {
- printf("Soft Power Off object is not available. Ignoring watchdog \
- refresh");
- }
-}
-
//-------------------------------------------------------------------
// Called by Host post response from Get_Message_Flags
//-------------------------------------------------------------------
@@ -85,7 +45,6 @@ ipmi_ret_t ipmi_app_read_event(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
switch (hCmd)
{
case Host::Command::SoftOff:
- notifySoftOff();
oem_sel.cmd = CMD_POWER;
oem_sel.data[0] = SOFT_OFF;
break;
OpenPOWER on IntegriCloud