All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH phosphor-host-ipmid] Support host reboot
@ 2015-12-03 21:30 OpenBMC Patches
  2015-12-03 21:30 ` OpenBMC Patches
  0 siblings, 1 reply; 2+ messages in thread
From: OpenBMC Patches @ 2015-12-03 21:30 UTC (permalink / raw)
  To: openbmc

https://github.com/openbmc/phosphor-host-ipmid/pull/48

Chris Austen (1):
  Support host reboot

 chassishandler.C | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.6.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH phosphor-host-ipmid] Support host reboot
  2015-12-03 21:30 [PATCH phosphor-host-ipmid] Support host reboot OpenBMC Patches
@ 2015-12-03 21:30 ` OpenBMC Patches
  0 siblings, 0 replies; 2+ messages in thread
From: OpenBMC Patches @ 2015-12-03 21:30 UTC (permalink / raw)
  To: openbmc

From: Chris Austen <austenc@us.ibm.com>

---
 chassishandler.C | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/chassishandler.C b/chassishandler.C
index 56b8375..1389db9 100644
--- a/chassishandler.C
+++ b/chassishandler.C
@@ -31,7 +31,7 @@ ipmi_ret_t ipmi_chassis_wildcard(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
 //------------------------------------------------------------
 // Calls into Chassis Control Dbus object to do the power off
 //------------------------------------------------------------
-int ipmi_chassis_power_off()
+int ipmi_chassis_power_control(const char *method)
 {
 	// sd_bus error
 	int rc = 0;
@@ -50,7 +50,7 @@ int ipmi_chassis_power_off()
 							chassis_bus_name,        // Service to contact
 							chassis_object_name,     // Object path 
 							chassis_intf_name,       // Interface name
-							"powerOff",      		 // Method to be called
+							method,      		 // Method to be called
 							&bus_error,      		 // object to return error
 							&response,		 		 // Response buffer if any
 							NULL);			 		 // No input arguments
@@ -69,6 +69,7 @@ int ipmi_chassis_power_off()
 	return rc;
 }
 
+
 //----------------------------------------------------------------------
 // Chassis Control commands
 //----------------------------------------------------------------------
@@ -89,11 +90,11 @@ ipmi_ret_t ipmi_chassis_control(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
 	switch(chassis_ctrl_cmd)
 	{
 		case CMD_POWER_OFF:
+			rc = ipmi_chassis_power_control("powerOff");
+			break;
 		case CMD_HARD_RESET:
-		{
-			rc = ipmi_chassis_power_off();
+			rc = ipmi_chassis_power_control("reboot");
 			break;
-		}
 		default:
 		{
 			fprintf(stderr, "Invalid Chassis Control command:[0x%X] received\n",chassis_ctrl_cmd);
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-04  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03 21:30 [PATCH phosphor-host-ipmid] Support host reboot OpenBMC Patches
2015-12-03 21:30 ` OpenBMC Patches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.