Skip to content

Commit

Permalink
Also shutdown from act dead activates power off led pattern
Browse files Browse the repository at this point in the history
Makes it easier to know when the device is actually powered off
and there is no reason to make act dead behave differently from
the other states.

[mce] Also shutdown from act dead activates power off led pattern
  • Loading branch information
spiiroin committed Jan 23, 2014
1 parent 7fbf239 commit aa704d5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions modetransition.c
Expand Up @@ -181,13 +181,18 @@ static void system_state_trigger(gconstpointer data)
case MCE_STATE_SHUTDOWN:
case MCE_STATE_REBOOT:
/* Actions to perform when shutting down/rebooting
* from anything else than acting dead
*/
if ((old_system_state == MCE_STATE_USER) ||
(old_system_state == MCE_STATE_BOOT) ||
(old_system_state == MCE_STATE_UNDEF)) {
switch( old_system_state ) {
case MCE_STATE_USER:
case MCE_STATE_BOOT:
case MCE_STATE_UNDEF:
case MCE_STATE_ACTDEAD:
execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_DEVICE_ON, USE_INDATA);
execute_datapipe_output_triggers(&led_pattern_activate_pipe, MCE_LED_PATTERN_POWER_OFF, USE_INDATA);
break;

default:
break;
}

/* If we're shutting down/rebooting from acting dead,
Expand Down

0 comments on commit aa704d5

Please sign in to comment.