diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2011-07-02 02:49:15 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2011-07-02 02:49:15 +0000 |
commit | e59558277ee721000fd75fe6d891fb044165ab6e (patch) | |
tree | f01e4c7eff1c8b41fa12e8cc5f52fcf25fea19f5 /bootloader | |
parent | a1e1892b0ff60e84ec788a027fae70b33cce8e6c (diff) | |
download | rockbox-e59558277ee721000fd75fe6d891fb044165ab6e.tar.gz rockbox-e59558277ee721000fd75fe6d891fb044165ab6e.zip |
bootloaders: cleanup
- make printf buffer static and local to printf()
- use '\0' instead of 0 for setting char
- remove unused dummy functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30117 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/common.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/bootloader/common.c b/bootloader/common.c index 8fb7cdef36..207d74ae9c 100644 --- a/bootloader/common.c +++ b/bootloader/common.c | |||
@@ -57,8 +57,6 @@ int line = 0; | |||
57 | int remote_line = 0; | 57 | int remote_line = 0; |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | char printfbuf[256]; | ||
61 | |||
62 | void reset_screen(void) | 60 | void reset_screen(void) |
63 | { | 61 | { |
64 | lcd_clear_display(); | 62 | lcd_clear_display(); |
@@ -71,6 +69,7 @@ void reset_screen(void) | |||
71 | 69 | ||
72 | int printf(const char *format, ...) | 70 | int printf(const char *format, ...) |
73 | { | 71 | { |
72 | static char printfbuf[256]; | ||
74 | int len; | 73 | int len; |
75 | unsigned char *ptr; | 74 | unsigned char *ptr; |
76 | va_list ap; | 75 | va_list ap; |
@@ -185,7 +184,7 @@ int load_firmware(unsigned char* buf, char* firmware, int buffer_size) | |||
185 | if(rc < 4) | 184 | if(rc < 4) |
186 | return EREAD_MODEL_FAILED; | 185 | return EREAD_MODEL_FAILED; |
187 | 186 | ||
188 | model[4] = 0; | 187 | model[4] = '\0'; |
189 | 188 | ||
190 | printf("Model name: %s", model); | 189 | printf("Model name: %s", model); |
191 | printf("Loading %s", firmware); | 190 | printf("Loading %s", firmware); |
@@ -240,17 +239,6 @@ int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size) | |||
240 | return len; | 239 | return len; |
241 | } | 240 | } |
242 | 241 | ||
243 | /* These functions are present in the firmware library, but we reimplement | ||
244 | them here because the originals do a lot more than we want */ | ||
245 | int dbg_ports(void) | ||
246 | { | ||
247 | return 0; | ||
248 | } | ||
249 | |||
250 | void mpeg_stop(void) | ||
251 | { | ||
252 | } | ||
253 | |||
254 | #ifdef ROCKBOX_HAS_LOGF /* Logf display helper for the bootloader */ | 242 | #ifdef ROCKBOX_HAS_LOGF /* Logf display helper for the bootloader */ |
255 | 243 | ||
256 | #define LINES (LCD_HEIGHT/SYSFONT_HEIGHT) | 244 | #define LINES (LCD_HEIGHT/SYSFONT_HEIGHT) |