Index: apps/installer-ipodclassic/main.c |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | #include "libmkfat32.h"
|
29 | 29 |
|
30 | 30 |
|
31 | | -void main(int argc, const char** argv);
|
| 31 | +static void main(int argc, const char** argv);
|
32 | 32 | EMCORE_APP_HEADER("emCORE installer", main, 127)
|
33 | 33 |
|
34 | 34 |
|
— | — | @@ -49,9 +49,9 @@ |
50 | 50 | extern uint32_t commonscript[];
|
51 | 51 |
|
52 | 52 |
|
53 | | -struct wakeup eventwakeup;
|
54 | | -volatile int button;
|
55 | | -volatile int scrollpos;
|
| 53 | +static struct wakeup eventwakeup;
|
| 54 | +static volatile int button;
|
| 55 | +static volatile int scrollpos;
|
56 | 56 |
|
57 | 57 |
|
58 | 58 | #define SHA1CONFIG (*((volatile uint32_t*)(0x38000000)))
|
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | #define SHA1RESULT ((volatile uint32_t*)(0x38000020))
|
61 | 61 | #define SHA1DATAIN ((volatile uint32_t*)(0x38000040))
|
62 | 62 |
|
63 | | -void sha1(void* data, uint32_t size, void* hash)
|
| 63 | +static void sha1(void* data, uint32_t size, void* hash)
|
64 | 64 | {
|
65 | 65 | int i, space;
|
66 | 66 | bool done = false;
|
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | }
|
107 | 107 |
|
108 | 108 |
|
109 | | -void handler(void* user, enum button_event eventtype, int which, int value)
|
| 109 | +static void handler(void* user, enum button_event eventtype, int which, int value)
|
110 | 110 | {
|
111 | 111 | if (eventtype == BUTTON_PRESS) button |= 1 << which;
|
112 | 112 | if (eventtype == BUTTON_RELEASE) button &= ~(1 << which);
|
— | — | @@ -114,18 +114,18 @@ |
115 | 115 | wakeup_signal(&eventwakeup);
|
116 | 116 | }
|
117 | 117 |
|
118 | | -void fat32_progressbar_init(void* user, int max)
|
| 118 | +static void fat32_progressbar_init(void* user, int max)
|
119 | 119 | {
|
120 | 120 | progressbar_init((struct progressbar_state*)user,
|
121 | 121 | 15, 304, 135, 159, 0x77ff, 0xe8, 0x125f, 0, max);
|
122 | 122 | }
|
123 | 123 |
|
124 | | -void fat32_progressbar_update(void* user, int current)
|
| 124 | +static void fat32_progressbar_update(void* user, int current)
|
125 | 125 | {
|
126 | 126 | progressbar_setpos((struct progressbar_state*)user, current, false);
|
127 | 127 | }
|
128 | 128 |
|
129 | | -void main(int argc, const char** argv)
|
| 129 | +static void main(int argc, const char** argv)
|
130 | 130 | {
|
131 | 131 | uint32_t i, j, k, rc;
|
132 | 132 | uint32_t dummy;
|
Index: apps/installer-ipodnano2g/main.c |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | #define BOOTNOTE_FILENAME "/Notes/" STR(BASENAME) ".bootnote"
|
33 | 33 |
|
34 | 34 |
|
35 | | -void main(int argc, const char** argv);
|
| 35 | +static void main(int argc, const char** argv);
|
36 | 36 | EMCORE_APP_HEADER("emCORE installer", main, 127)
|
37 | 37 |
|
38 | 38 |
|
— | — | @@ -52,20 +52,20 @@ |
53 | 53 | extern uint32_t commonscript[];
|
54 | 54 |
|
55 | 55 |
|
56 | | -uint32_t fat32_ok;
|
57 | | -uint32_t fat32_startsector;
|
58 | | -uint32_t fat32_secperclus;
|
59 | | -uint32_t fat32_database;
|
60 | | -uint32_t fat32_fatbase;
|
61 | | -uint32_t fat32_fatsize;
|
62 | | -uint32_t fat32_fatcount;
|
63 | | -uint32_t fat32_sectorcount;
|
64 | | -uint32_t fat32_clustercount;
|
65 | | -uint32_t fat32_rootdirclus;
|
| 56 | +static uint32_t fat32_ok;
|
| 57 | +static uint32_t fat32_startsector;
|
| 58 | +static uint32_t fat32_secperclus;
|
| 59 | +static uint32_t fat32_database;
|
| 60 | +static uint32_t fat32_fatbase;
|
| 61 | +static uint32_t fat32_fatsize;
|
| 62 | +static uint32_t fat32_fatcount;
|
| 63 | +static uint32_t fat32_sectorcount;
|
| 64 | +static uint32_t fat32_clustercount;
|
| 65 | +static uint32_t fat32_rootdirclus;
|
66 | 66 |
|
67 | | -struct wakeup eventwakeup;
|
68 | | -volatile int button;
|
69 | | -volatile int scrollpos;
|
| 67 | +static struct wakeup eventwakeup;
|
| 68 | +static volatile int button;
|
| 69 | +static volatile int scrollpos;
|
70 | 70 |
|
71 | 71 |
|
72 | 72 | #define nor ((uint8_t*)0x24000000)
|
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | #define norword ((uint32_t*)0x24000000)
|
74 | 74 |
|
75 | 75 |
|
76 | | -void handler(void* user, enum button_event eventtype, int which, int value)
|
| 76 | +static void handler(void* user, enum button_event eventtype, int which, int value)
|
77 | 77 | {
|
78 | 78 | if (eventtype == BUTTON_PRESS) button |= 1 << which;
|
79 | 79 | if (eventtype == BUTTON_RELEASE) button &= ~(1 << which);
|
— | — | @@ -81,13 +81,13 @@ |
82 | 82 | wakeup_signal(&eventwakeup);
|
83 | 83 | }
|
84 | 84 |
|
85 | | -uint32_t freeret(uint32_t rc, void* ptr)
|
| 85 | +static uint32_t freeret(uint32_t rc, void* ptr)
|
86 | 86 | {
|
87 | 87 | free(ptr);
|
88 | 88 | return rc;
|
89 | 89 | }
|
90 | 90 |
|
91 | | -int decryptfw(void* image, uint32_t offset)
|
| 91 | +static int decryptfw(void* image, uint32_t offset)
|
92 | 92 | {
|
93 | 93 | uint32_t size = ((uint32_t*)image)[5];
|
94 | 94 | if (size > 0x800000) return 0;
|
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | return size;
|
99 | 99 | }
|
100 | 100 |
|
101 | | -uint32_t getfw(const char* filename, uint32_t* sector, int* size)
|
| 101 | +static uint32_t getfw(const char* filename, uint32_t* sector, int* size)
|
102 | 102 | {
|
103 | 103 | uint32_t i;
|
104 | 104 | uint32_t* buffer = memalign(0x10, 0x800);
|
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | return freeret(2, buffer);
|
133 | 133 | }
|
134 | 134 |
|
135 | | -uint32_t readfw(const char* filename, void** address, int* size)
|
| 135 | +static uint32_t readfw(const char* filename, void** address, int* size)
|
136 | 136 | {
|
137 | 137 | uint32_t sector;
|
138 | 138 | uint32_t rc = getfw(filename, §or, size);
|
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | return 0;
|
147 | 147 | }
|
148 | 148 |
|
149 | | -uint32_t getapplenor(const char* filename, void** address, int* size)
|
| 149 | +static uint32_t getapplenor(const char* filename, void** address, int* size)
|
150 | 150 | {
|
151 | 151 | uint32_t i;
|
152 | 152 | for (i = 0xffe00; i < 0x100000; i += 0x28)
|
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | return 1;
|
160 | 160 | }
|
161 | 161 |
|
162 | | -uint32_t readapplenor(const char* filename, void** address, int* size)
|
| 162 | +static uint32_t readapplenor(const char* filename, void** address, int* size)
|
163 | 163 | {
|
164 | 164 | void* noraddr;
|
165 | 165 | uint32_t rc = getapplenor(filename, &noraddr, size);
|
— | — | @@ -171,8 +171,8 @@ |
172 | 172 | return 0;
|
173 | 173 | }
|
174 | 174 |
|
175 | | -uint32_t fat32_resize_patchdirs(uint32_t clusterchain, uint32_t clustoffset,
|
176 | | - struct progressbar_state* progressbar, int min, int len)
|
| 175 | +static uint32_t fat32_resize_patchdirs(uint32_t clusterchain, uint32_t clustoffset,
|
| 176 | + struct progressbar_state* progressbar, int min, int len)
|
177 | 177 | {
|
178 | 178 | uint32_t i, j, rc;
|
179 | 179 | uint32_t* buffer = (uint32_t*)memalign(0x10, 0x800);
|
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | return 0;
|
238 | 238 | }
|
239 | 239 |
|
240 | | -uint32_t fat32_resize_fulldisk(struct progressbar_state* progressbar)
|
| 240 | +static uint32_t fat32_resize_fulldisk(struct progressbar_state* progressbar)
|
241 | 241 | {
|
242 | 242 | uint32_t i, j, rc;
|
243 | 243 | uint32_t fatsectors = 1;
|
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | return 0;
|
420 | 420 | }
|
421 | 421 |
|
422 | | -uint32_t fat32_init()
|
| 422 | +static uint32_t fat32_init()
|
423 | 423 | {
|
424 | 424 | uint32_t i;
|
425 | 425 | fat32_ok = 0;
|
— | — | @@ -474,7 +474,7 @@ |
475 | 475 | return 0;
|
476 | 476 | }
|
477 | 477 |
|
478 | | -void main(int argc, const char** argv)
|
| 478 | +static void main(int argc, const char** argv)
|
479 | 479 | {
|
480 | 480 | uint32_t i, j, k, rc;
|
481 | 481 | uint32_t dummy;
|