freemyipod r118 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r117‎ | r118 | r119 >
Date:23:26, 12 August 2010
Author:theseven
Status:new
Tags:
Comment:
Add get_platform_id() syscall
Modified paths:
  • /embios/trunk/export/syscallapi.h (modified) (history)
  • /embios/trunk/export/syscallwrappers.h (modified) (history)
  • /embios/trunk/syscall.c (modified) (history)
  • /embios/trunk/syscall.h (modified) (history)
  • /embios/trunk/syscallapi.c (modified) (history)

Diff [purge]

Index: embios/trunk/export/syscallwrappers.h
@@ -155,6 +155,7 @@
156156 #define backlight_on(args...) __embios_syscall->backlight_on(args)
157157 #define backlight_set_fade(args...) __embios_syscall->backlight_set_fade(args)
158158 #define backlight_set_brightness(args...) __embios_syscall->backlight_set_brightness(args)
 159+#define get_platform_id(args...) __embios_syscall->get_platform_id(args)
159160
160161
161162 #endif
Index: embios/trunk/export/syscallapi.h
@@ -46,6 +46,7 @@
4747 #include "../power.h"
4848 #include "../execimage.h"
4949 #include "../backlight.h"
 50+#include "../syscall.h"
5051 #include "../libc/include/string.h"
5152 #include "../libc/include/stdlib.h"
5253 #include "../libc/include/stdio.h"
@@ -187,6 +188,7 @@
188189 typeof(backlight_on) *backlight_on;
189190 typeof(backlight_set_fade) *backlight_set_fade;
190191 typeof(backlight_set_brightness) *backlight_set_brightness;
 192+ typeof(get_platform_id) *get_platform_id;
191193 };
192194
193195
Index: embios/trunk/syscall.c
@@ -33,3 +33,8 @@
3434 {
3535 return &syscall_table;
3636 }
 37+
 38+uint32_t get_platform_id()
 39+{
 40+ return PLATFORM_ID;
 41+}
Index: embios/trunk/syscall.h
@@ -26,9 +26,14 @@
2727
2828
2929 #include "global.h"
30 -#include "syscallapi.h"
3130
3231
 32+uint32_t get_platform_id() ICODE_ATTR;
 33+
 34+
 35+#include "syscallapi.h" // must be below get_platform_id
 36+
 37+
3338 struct embios_syscall_table* get_syscall_table() ICODE_ATTR;
3439
3540
Index: embios/trunk/syscallapi.c
@@ -43,6 +43,7 @@
4444 #include "power.h"
4545 #include "execimage.h"
4646 #include "backlight.h"
 47+#include "syscall.h"
4748 #include "libc/include/string.h"
4849 #include "libc/include/stdlib.h"
4950 #include "libc/include/stdio.h"
@@ -120,6 +121,7 @@
121122 .strrchr = strrchr,
122123 .strstr = strstr,
123124 .strtok_r = strtok_r,
 125+ .get_platform_id = get_platform_id,
124126 #ifdef HAVE_STORAGE
125127 .opendir = opendir,
126128 .closedir = closedir,