diff options
Diffstat (limited to 'rbutil/sansapatcher/main.c')
-rw-r--r-- | rbutil/sansapatcher/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/main.c b/rbutil/sansapatcher/main.c index 31b690509f..985e1b7262 100644 --- a/rbutil/sansapatcher/main.c +++ b/rbutil/sansapatcher/main.c | |||
@@ -31,10 +31,14 @@ | |||
31 | #include "sansapatcher.h" | 31 | #include "sansapatcher.h" |
32 | #include "sansaio.h" | 32 | #include "sansaio.h" |
33 | #include "parttypes.h" | 33 | #include "parttypes.h" |
34 | #ifdef WITH_BOOTOBJS | ||
34 | #include "bootimg_c200.h" | 35 | #include "bootimg_c200.h" |
35 | #include "bootimg_e200.h" | 36 | #include "bootimg_e200.h" |
37 | #endif | ||
36 | 38 | ||
39 | #ifndef VERSION | ||
37 | #define VERSION "0.8 with v6.0 bootloaders" | 40 | #define VERSION "0.8 with v6.0 bootloaders" |
41 | #endif | ||
38 | 42 | ||
39 | enum { | 43 | enum { |
40 | NONE, | 44 | NONE, |
@@ -200,7 +204,9 @@ int main(int argc, char* argv[]) | |||
200 | i = 1; | 204 | i = 1; |
201 | } | 205 | } |
202 | 206 | ||
207 | #ifdef WITH_BOOTOBJS | ||
203 | action = INTERACTIVE; | 208 | action = INTERACTIVE; |
209 | #endif | ||
204 | 210 | ||
205 | while (i < argc) { | 211 | while (i < argc) { |
206 | if ((strcmp(argv[i],"-l")==0) || (strcmp(argv[i],"--list")==0)) { | 212 | if ((strcmp(argv[i],"-l")==0) || (strcmp(argv[i],"--list")==0)) { |
@@ -279,6 +285,7 @@ int main(int argc, char* argv[]) | |||
279 | } else { | 285 | } else { |
280 | if (action==LIST_IMAGES) { | 286 | if (action==LIST_IMAGES) { |
281 | sansa_list_images(&sansa); | 287 | sansa_list_images(&sansa); |
288 | #ifdef WITH_BOOTOBJS | ||
282 | } else if (action==INTERACTIVE) { | 289 | } else if (action==INTERACTIVE) { |
283 | 290 | ||
284 | printf("Enter i to install the Rockbox bootloader, u to uninstall\n or c to cancel and do nothing (i/u/c) :"); | 291 | printf("Enter i to install the Rockbox bootloader, u to uninstall\n or c to cancel and do nothing (i/u/c) :"); |
@@ -314,12 +321,14 @@ int main(int argc, char* argv[]) | |||
314 | } | 321 | } |
315 | } | 322 | } |
316 | } | 323 | } |
324 | #endif | ||
317 | } else if (action==READ_FIRMWARE) { | 325 | } else if (action==READ_FIRMWARE) { |
318 | if (sansa_read_firmware(&sansa, filename)==0) { | 326 | if (sansa_read_firmware(&sansa, filename)==0) { |
319 | fprintf(stderr,"[INFO] Firmware read to file %s.\n",filename); | 327 | fprintf(stderr,"[INFO] Firmware read to file %s.\n",filename); |
320 | } else { | 328 | } else { |
321 | fprintf(stderr,"[ERR] --read-firmware failed.\n"); | 329 | fprintf(stderr,"[ERR] --read-firmware failed.\n"); |
322 | } | 330 | } |
331 | #ifdef WITH_BOOTOBJS | ||
323 | } else if (action==INSTALL) { | 332 | } else if (action==INSTALL) { |
324 | if (sansa_reopen_rw(&sansa) < 0) { | 333 | if (sansa_reopen_rw(&sansa) < 0) { |
325 | return 5; | 334 | return 5; |
@@ -338,6 +347,7 @@ int main(int argc, char* argv[]) | |||
338 | } else { | 347 | } else { |
339 | fprintf(stderr,"[ERR] --install failed.\n"); | 348 | fprintf(stderr,"[ERR] --install failed.\n"); |
340 | } | 349 | } |
350 | #endif | ||
341 | } else if (action==ADD_BOOTLOADER) { | 351 | } else if (action==ADD_BOOTLOADER) { |
342 | if (sansa_reopen_rw(&sansa) < 0) { | 352 | if (sansa_reopen_rw(&sansa) < 0) { |
343 | return 5; | 353 | return 5; |