mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
- neutrino: avoid some ifdef's; prioritize proc filesystem
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -2178,7 +2178,9 @@ void wake_up(bool &wakeup)
|
|||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_ARM_HARDWARE
|
/* prioritize proc filesystem */
|
||||||
|
if (access("/proc/stb/fp/was_timer_wakeup", F_OK) == 0)
|
||||||
|
{
|
||||||
FILE *f = fopen("/proc/stb/fp/was_timer_wakeup", "r");
|
FILE *f = fopen("/proc/stb/fp/was_timer_wakeup", "r");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
@@ -2189,9 +2191,10 @@ void wake_up(bool &wakeup)
|
|||||||
wakeup = (tmp > 0);
|
wakeup = (tmp > 0);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
#endif // HAVE_ARM_HARDWARE
|
}
|
||||||
/* not platform specific - this is created by the init process */
|
/* not platform specific - this is created by the init process */
|
||||||
if (access("/tmp/.timer_wakeup", F_OK) == 0) {
|
else if (access("/tmp/.timer_wakeup", F_OK) == 0)
|
||||||
|
{
|
||||||
wakeup = 1;
|
wakeup = 1;
|
||||||
unlink("/tmp/.timer_wakeup");
|
unlink("/tmp/.timer_wakeup");
|
||||||
}
|
}
|
||||||
@@ -3949,7 +3952,9 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
|
|||||||
#endif
|
#endif
|
||||||
if (timer_minutes || leds)
|
if (timer_minutes || leds)
|
||||||
{
|
{
|
||||||
#if HAVE_ARM_HARDWARE
|
/* prioritize proc filesystem */
|
||||||
|
if (access("/proc/stb/fp/was_timer_wakeup", 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)
|
||||||
{
|
{
|
||||||
@@ -3963,7 +3968,10 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
perror("fopen /proc/stb/fp/wakeup_time");
|
perror("fopen /proc/stb/fp/wakeup_time");
|
||||||
#else
|
}
|
||||||
|
/* not platform specific */
|
||||||
|
else
|
||||||
|
{
|
||||||
FILE *f = fopen("/tmp/.timer", "w");
|
FILE *f = fopen("/tmp/.timer", "w");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
@@ -3975,7 +3983,7 @@ void CNeutrinoApp::ExitRun(int can_shutdown)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
perror("fopen /tmp/.timer");
|
perror("fopen /tmp/.timer");
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete g_RCInput;
|
delete g_RCInput;
|
||||||
|
Reference in New Issue
Block a user