diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/hosted/android/system-android.c | 12 | ||||
-rw-r--r-- | firmware/target/hosted/samsungypr/ypr0/system-ypr0.c | 14 | ||||
-rw-r--r-- | firmware/target/hosted/samsungypr/ypr1/system-ypr1.c | 14 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 1 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/system-sdl.c | 18 |
5 files changed, 59 insertions, 0 deletions
diff --git a/firmware/target/hosted/android/system-android.c b/firmware/target/hosted/android/system-android.c index d96edcd637..313bfbcd62 100644 --- a/firmware/target/hosted/android/system-android.c +++ b/firmware/target/hosted/android/system-android.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <setjmp.h> | 23 | #include <setjmp.h> |
24 | #include <jni.h> | 24 | #include <jni.h> |
25 | #include <pthread.h> | 25 | #include <pthread.h> |
26 | #include <unistd.h> | ||
26 | #include "config.h" | 27 | #include "config.h" |
27 | #include "system.h" | 28 | #include "system.h" |
28 | #include "power.h" | 29 | #include "power.h" |
@@ -66,6 +67,17 @@ void system_init(void) | |||
66 | telephony_init_device(); | 67 | telephony_init_device(); |
67 | } | 68 | } |
68 | 69 | ||
70 | void hostfs_init(void) | ||
71 | { | ||
72 | /* stub */ | ||
73 | } | ||
74 | |||
75 | int hostfs_flush(void) | ||
76 | { | ||
77 | sync(); | ||
78 | return 0; | ||
79 | } | ||
80 | |||
69 | JNIEXPORT jint JNICALL | 81 | JNIEXPORT jint JNICALL |
70 | JNI_OnLoad(JavaVM *vm, void* reserved) | 82 | JNI_OnLoad(JavaVM *vm, void* reserved) |
71 | { | 83 | { |
diff --git a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c index 6232df4a22..477b71c6a2 100644 --- a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c +++ b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c | |||
@@ -21,9 +21,11 @@ | |||
21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
22 | #include <string.h> | 22 | #include <string.h> |
23 | #include <inttypes.h> | 23 | #include <inttypes.h> |
24 | #include <unistd.h> | ||
24 | #include "system.h" | 25 | #include "system.h" |
25 | #include "panic.h" | 26 | #include "panic.h" |
26 | #include "debug.h" | 27 | #include "debug.h" |
28 | #include "hostfs.h" | ||
27 | 29 | ||
28 | #include "ascodec.h" | 30 | #include "ascodec.h" |
29 | #include "gpio-ypr.h" | 31 | #include "gpio-ypr.h" |
@@ -59,6 +61,18 @@ void system_exception_wait(void) | |||
59 | system_reboot(); | 61 | system_reboot(); |
60 | } | 62 | } |
61 | 63 | ||
64 | void hostfs_init(void) | ||
65 | { | ||
66 | /* stub */ | ||
67 | } | ||
68 | |||
69 | int hostfs_flush(void) | ||
70 | { | ||
71 | sync(); | ||
72 | |||
73 | return 0; | ||
74 | } | ||
75 | |||
62 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 76 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
63 | #include <stdio.h> | 77 | #include <stdio.h> |
64 | #include "file.h" | 78 | #include "file.h" |
diff --git a/firmware/target/hosted/samsungypr/ypr1/system-ypr1.c b/firmware/target/hosted/samsungypr/ypr1/system-ypr1.c index 9aa49786f1..7efa73b273 100644 --- a/firmware/target/hosted/samsungypr/ypr1/system-ypr1.c +++ b/firmware/target/hosted/samsungypr/ypr1/system-ypr1.c | |||
@@ -21,9 +21,11 @@ | |||
21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
22 | #include <string.h> | 22 | #include <string.h> |
23 | #include <inttypes.h> | 23 | #include <inttypes.h> |
24 | #include <unistd.h> | ||
24 | #include "system.h" | 25 | #include "system.h" |
25 | #include "panic.h" | 26 | #include "panic.h" |
26 | #include "debug.h" | 27 | #include "debug.h" |
28 | #include "hostfs.h" | ||
27 | 29 | ||
28 | #include "gpio-ypr.h" | 30 | #include "gpio-ypr.h" |
29 | #include "pmu-ypr1.h" | 31 | #include "pmu-ypr1.h" |
@@ -65,3 +67,15 @@ void system_exception_wait(void) | |||
65 | { | 67 | { |
66 | system_reboot(); | 68 | system_reboot(); |
67 | } | 69 | } |
70 | |||
71 | void hostfs_init() | ||
72 | { | ||
73 | /* stub */ | ||
74 | } | ||
75 | |||
76 | int hostfs_flush(void) | ||
77 | { | ||
78 | sync(); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 91338bb0d5..1ed07c153c 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "buttonmap.h" | 36 | #include "buttonmap.h" |
37 | #include "debug.h" | 37 | #include "debug.h" |
38 | #include "powermgmt.h" | 38 | #include "powermgmt.h" |
39 | #include "storage.h" | ||
39 | 40 | ||
40 | #ifdef HAVE_TOUCHSCREEN | 41 | #ifdef HAVE_TOUCHSCREEN |
41 | #include "touchscreen.h" | 42 | #include "touchscreen.h" |
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c index 572d6d570a..25e77c22a2 100644 --- a/firmware/target/hosted/sdl/system-sdl.c +++ b/firmware/target/hosted/sdl/system-sdl.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include <inttypes.h> | 26 | #include <inttypes.h> |
27 | #ifdef __unix__ | ||
28 | #include <unistd.h> | ||
29 | #endif | ||
27 | #include "system.h" | 30 | #include "system.h" |
28 | #include "kernel.h" | 31 | #include "kernel.h" |
29 | #include "thread-sdl.h" | 32 | #include "thread-sdl.h" |
@@ -286,6 +289,21 @@ void system_exception_wait(void) | |||
286 | system_reboot(); | 289 | system_reboot(); |
287 | } | 290 | } |
288 | 291 | ||
292 | void hostfs_init(void) | ||
293 | { | ||
294 | /* stub */ | ||
295 | } | ||
296 | |||
297 | #ifdef HAVE_STORAGE_FLUSH | ||
298 | int hostfs_flush(void) | ||
299 | { | ||
300 | #ifdef __unix__ | ||
301 | sync(); | ||
302 | #endif | ||
303 | return 0; | ||
304 | } | ||
305 | #endif /* HAVE_STORAGE_FLUSH */ | ||
306 | |||
289 | void sys_handle_argv(int argc, char *argv[]) | 307 | void sys_handle_argv(int argc, char *argv[]) |
290 | { | 308 | { |
291 | if (argc >= 1) | 309 | if (argc >= 1) |