diff options
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 38760a0e58..562cf17ca4 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "lcd.h" | 33 | #include "lcd.h" |
34 | #include "font.h" | 34 | #include "font.h" |
35 | #include "storage.h" | 35 | #include "storage.h" |
36 | #include "file_internal.h" | ||
36 | #include "adc.h" | 37 | #include "adc.h" |
37 | #include "button.h" | 38 | #include "button.h" |
38 | #include "disk.h" | 39 | #include "disk.h" |
@@ -291,7 +292,7 @@ void* main(void) | |||
291 | int btn; | 292 | int btn; |
292 | int rc; | 293 | int rc; |
293 | int num_partitions; | 294 | int num_partitions; |
294 | struct partinfo* pinfo; | 295 | struct partinfo pinfo; |
295 | #if !(CONFIG_STORAGE & STORAGE_SD) | 296 | #if !(CONFIG_STORAGE & STORAGE_SD) |
296 | char buf[256]; | 297 | char buf[256]; |
297 | unsigned short* identify_info; | 298 | unsigned short* identify_info; |
@@ -370,7 +371,7 @@ void* main(void) | |||
370 | } | 371 | } |
371 | #endif | 372 | #endif |
372 | 373 | ||
373 | disk_init(IF_MV(0)); | 374 | filesystem_init(); |
374 | num_partitions = disk_mount_all(); | 375 | num_partitions = disk_mount_all(); |
375 | if (num_partitions<=0) | 376 | if (num_partitions<=0) |
376 | { | 377 | { |
@@ -381,9 +382,9 @@ void* main(void) | |||
381 | that have more than that */ | 382 | that have more than that */ |
382 | for(i=0; i<NUM_PARTITIONS; i++) | 383 | for(i=0; i<NUM_PARTITIONS; i++) |
383 | { | 384 | { |
384 | pinfo = disk_partinfo(i); | 385 | disk_partinfo(i, &pinfo); |
385 | printf("Partition %d: 0x%02x %ld MB", | 386 | printf("Partition %d: 0x%02x %ld MB", |
386 | i, pinfo->type, pinfo->size / 2048); | 387 | i, pinfo.type, pinfo.size / 2048); |
387 | } | 388 | } |
388 | 389 | ||
389 | /* Now that storage is initialized, check for USB connection */ | 390 | /* Now that storage is initialized, check for USB connection */ |
@@ -430,10 +431,10 @@ void* main(void) | |||
430 | #if (CONFIG_STORAGE & STORAGE_SD) | 431 | #if (CONFIG_STORAGE & STORAGE_SD) |
431 | /* First try a (hidden) firmware partition */ | 432 | /* First try a (hidden) firmware partition */ |
432 | printf("Trying firmware partition"); | 433 | printf("Trying firmware partition"); |
433 | pinfo = disk_partinfo(1); | 434 | disk_partinfo(1, &pinfo); |
434 | if(pinfo->type == PARTITION_TYPE_OS2_HIDDEN_C_DRIVE) | 435 | if(pinfo.type == PARTITION_TYPE_OS2_HIDDEN_C_DRIVE) |
435 | { | 436 | { |
436 | rc = load_mi4_part(loadbuffer, pinfo, MAX_LOADSIZE, | 437 | rc = load_mi4_part(loadbuffer, &pinfo, MAX_LOADSIZE, |
437 | usb == USB_INSERTED); | 438 | usb == USB_INSERTED); |
438 | if (rc <= EFILE_EMPTY) { | 439 | if (rc <= EFILE_EMPTY) { |
439 | printf("Can't load from partition"); | 440 | printf("Can't load from partition"); |