mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 09:48:51 +01:00
use single powerdown script
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
b319dbaf90
commit
918466584b
@ -52,9 +52,8 @@ typedef enum {ASPECT_RATIOS} ENUM_ASPECT_RATIOS_TYPES;
|
||||
#define SHELL_CMD_USB_MOUNT "share start"
|
||||
#define SHELL_CMD_USB_UNMOUNT "share stop"
|
||||
#define SHELL_CMD_USB_CHECK_IS_SHARING "share is_sharing"
|
||||
#define SHELL_CMD_POWERDOWN "shutdown_funkey"
|
||||
#define SHELL_CMD_SCHEDULE_POWERDOWN "sched_shutdown"
|
||||
#define SHELL_CMD_CANCEL_SCHED_POWERDOWN "cancel_sched_powerdown"
|
||||
#define SHELL_CMD_POWERDOWN "powerdown"
|
||||
#define SHELL_CMD_POWERDOWN_HANDLE "powerdown handle"
|
||||
#define SHELL_CMD_FRONTEND_SET_GMENU2X "frontend set gmenu2x"
|
||||
#define SHELL_CMD_FRONTEND_SET_RETROFE "frontend set retrofe"
|
||||
|
||||
|
||||
@ -1557,14 +1557,14 @@ void RetroFE::handle_sigusr1(int sig)
|
||||
void RetroFE::quick_poweroff()
|
||||
{
|
||||
/* Send command to cancel any previously scheduled powerdown */
|
||||
if (popen(SHELL_CMD_CANCEL_SCHED_POWERDOWN, "r") == NULL)
|
||||
if (popen(SHELL_CMD_POWERDOWN_HANDLE, "r") == NULL)
|
||||
{
|
||||
/* Countdown is still ticking, so better do nothing
|
||||
than start writing and get interrupted!
|
||||
*/
|
||||
printf("Failed to cancel scheduled shutdown\n");
|
||||
std::stringstream ss;
|
||||
ss << "Failed to run command " << SHELL_CMD_CANCEL_SCHED_POWERDOWN;
|
||||
ss << "Failed to run command " << SHELL_CMD_POWERDOWN_HANDLE;
|
||||
Logger::write( Logger::ZONE_ERROR, "RetroFE", ss.str() );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user