X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/da9872eac33f4f8a085261c3cbdcbf4c8d664f65..a0e35e5a58f8969b6cea51494954a636a80c72a4:/main/enigma.cpp diff --git a/main/enigma.cpp b/main/enigma.cpp index 307edd5a..0893b035 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -1,5 +1,8 @@ -#include #include +#include +#include +#include +#include #include #include @@ -277,6 +280,24 @@ void runMainloop() void quitMainloop(int exitCode) { + FILE *f = fopen("/proc/stb/fp/was_timer_wakeup", "w"); + if (f) + { + fprintf(f, "%d", 0); + fclose(f); + } + else + { + int fd = open("/dev/dbox/fp0", O_WRONLY); + if (fd >= 0) + { + if (ioctl(fd, 10 /*FP_CLEAR_WAKEUP_TIMER*/) < 0) + eDebug("FP_CLEAR_WAKEUP_TIMER failed (%m)"); + close(fd); + } + else + eDebug("open /dev/dbox/fp0 for wakeup timer clear failed!(%m)"); + } exit_code = exitCode; eApp->quit(0); }