From ebdca865963e177cf103d04ce3b949f0b9bee42a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 Oct 2012 14:29:03 +0100 Subject: [PATCH] neutrino.cpp: handle deepstandy-scripts in same way as the other scripts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5284ffa3d64993a1158064f9b970aca470f01a77 Author: vanhofen Date: 2012-10-29 (Mon, 29 Oct 2012) Origin message was: ------------------ - neutrino.cpp: handle deepstandy-scripts in same way as the other scripts ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/global.h | 2 ++ src/neutrino.cpp | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/global.h b/src/global.h index e0fe58160..6dc24d549 100644 --- a/src/global.h +++ b/src/global.h @@ -66,6 +66,8 @@ #define NEUTRINO_RECORDING_ENDED_SCRIPT CONFIGDIR "/recording.end" #define NEUTRINO_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on" #define NEUTRINO_LEAVE_STANDBY_SCRIPT CONFIGDIR "/standby.off" +#define NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.on" +#define NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.off" #define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start" #define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 48016d67b..6c6719328 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1751,10 +1751,9 @@ void wake_up( bool &wakeup) } printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); if(!wakeup){ - const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off"; - printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script); - if (my_system(neutrino_leave_deepstandby_script) != 0) - perror( neutrino_leave_deepstandby_script ); + puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT "."); + if (my_system(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT) != 0) + perror(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT " failed"); } #endif @@ -2913,10 +2912,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) saveSetup(NEUTRINO_SETTINGS_FILE); if(retcode) { - const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on"; - printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script); - if (my_system(neutrino_enter_deepstandby_script) != 0) - perror(neutrino_enter_deepstandby_script ); + puts("[neutrino.cpp] executing " NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT "."); + if (my_system(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT) != 0) + perror(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT " failed"); printf("entering off state\n"); mode = mode_off;