Skip to content

Commit

Permalink
use single powerdown script
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent-FK <[email protected]>
  • Loading branch information
Vincent-FK committed Jun 3, 2021
1 parent c3de812 commit 5d8490f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion menu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void quick_save_and_poweroff()
printf("Save Instant Play file\n");

/* Send command to cancel any previously scheduled powerdown */
fp = popen(SHELL_CMD_CANCEL_SCHED_POWERDOWN, "r");
fp = popen(SHELL_CMD_POWERDOWN_HANDLE, "r");
if (fp == NULL)
{
/* Countdown is still ticking, so better do nothing
Expand Down
4 changes: 2 additions & 2 deletions menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,8 @@ void run_menu_loop()
if(menu_confirmation){
MENU_DEBUG_PRINTF("Powerdown - confirmed\n");
/// ----- Shell cmd ----
execlp(SHELL_CMD_SHUTDOWN_FUNKEY, SHELL_CMD_SHUTDOWN_FUNKEY, NULL);
MENU_ERROR_PRINTF("Failed to run command %s\n", SHELL_CMD_SHUTDOWN_FUNKEY);
execlp(SHELL_CMD_POWERDOWN, SHELL_CMD_POWERDOWN, NULL);
MENU_ERROR_PRINTF("Failed to run command %s\n", SHELL_CMD_POWERDOWN);
exit(0);
}
else{
Expand Down
4 changes: 2 additions & 2 deletions menu/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ typedef enum {RESUME_OPTIONS} ENUM_RESUME_OPTIONS;
#define SHELL_CMD_NOTIF_CLEAR "notif clear"
#define SHELL_CMD_AUDIO_AMP_ON "audio_amp on"
#define SHELL_CMD_AUDIO_AMP_OFF "audio_amp off"
#define SHELL_CMD_CANCEL_SCHED_POWERDOWN "cancel_sched_powerdown"
#define SHELL_CMD_POWERDOWN "powerdown"
#define SHELL_CMD_POWERDOWN_HANDLE "powerdown handle"
#define SHELL_CMD_INSTANT_PLAY "instant_play"
#define SHELL_CMD_SHUTDOWN_FUNKEY "shutdown_funkey"
#define SHELL_CMD_KEYMAP_DEFAULT "keymap default"
#define SHELL_CMD_KEYMAP_RESUME "keymap resume"

Expand Down

0 comments on commit 5d8490f

Please sign in to comment.