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 <vincent.buso@funkey-project.com>
Vincent-FK committed Jun 3, 2021
1 parent c3ae7fa commit 336090c
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/drivers/dingux-sdl/dingoo.cpp
Original file line number Diff line number Diff line change
@@ -305,7 +305,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
4 changes: 2 additions & 2 deletions src/drivers/dingux-sdl/menu.cpp
Original file line number Diff line number Diff line change
@@ -925,8 +925,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{
4 changes: 2 additions & 2 deletions src/drivers/dingux-sdl/menu.h
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ typedef enum {RESUME_OPTIONS} ENUM_RESUME_OPTIONS;
#define SHELL_CMD_NOTIF_SET "notif set"
#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"

0 comments on commit 336090c

Please sign in to comment.