mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
neutrino: unify console-output for different conditions in ExitRun()
Signed-off-by: Thilo Graf <dbt@novatux.de>
Origin commit data
------------------
Branch: ni/coolstream
Commit: 14fafa3059
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-20 (Mon, 20 Nov 2017)
Origin message was:
------------------
- neutrino: unify console-output for different conditions in ExitRun()
Signed-off-by: Thilo Graf <dbt@novatux.de>
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3879,17 +3879,18 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
|
|||||||
#endif
|
#endif
|
||||||
if (timer_minutes || leds)
|
if (timer_minutes || leds)
|
||||||
{
|
{
|
||||||
|
time_t t = timer_minutes * 60;
|
||||||
|
struct tm *tm = localtime(&t);
|
||||||
|
char date[30];
|
||||||
|
strftime(date, sizeof(date), "%c", tm);
|
||||||
|
printf("timer_wakeup: %s (%ld)\n", date, timer_minutes * 60);
|
||||||
|
|
||||||
/* prioritize proc filesystem */
|
/* prioritize proc filesystem */
|
||||||
if (access("/proc/stb/fp/wakeup_time", F_OK) == 0)
|
if (access("/proc/stb/fp/wakeup_time", F_OK) == 0)
|
||||||
{
|
{
|
||||||
FILE *f = fopen("/proc/stb/fp/wakeup_time","w");
|
FILE *f = fopen("/proc/stb/fp/wakeup_time","w");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
time_t t = timer_minutes * 60;
|
|
||||||
struct tm *tm = localtime(&t);
|
|
||||||
char date[30];
|
|
||||||
strftime(date, sizeof(date), "%c", tm);
|
|
||||||
fprintf(stderr, "timer_wakeup: %s (%ld)\n", date, timer_minutes * 60);
|
|
||||||
fprintf(f, "%ld\n", timer_minutes * 60);
|
fprintf(f, "%ld\n", timer_minutes * 60);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
@@ -3902,7 +3903,6 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
|
|||||||
FILE *f = fopen("/tmp/.timer", "w");
|
FILE *f = fopen("/tmp/.timer", "w");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "timer_wakeup: %ld\n", timer_minutes * 60);
|
|
||||||
fprintf(f, "%ld\n", timer_minutes * 60);
|
fprintf(f, "%ld\n", timer_minutes * 60);
|
||||||
fprintf(f, "%d\n", leds);
|
fprintf(f, "%d\n", leds);
|
||||||
fprintf(f, "%d\n", bright);
|
fprintf(f, "%d\n", bright);
|
||||||
|
Reference in New Issue
Block a user