diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2012-03-04 15:34:29 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2013-06-27 13:50:11 +0200 |
commit | 0b29691324e5700f15ea653592bf29f8552d47d7 (patch) | |
tree | 00e4f77f28c813a493cd8af22170f486f6e82903 /bootloader/ondavx747.c | |
parent | 46ea8bfe7c690c8db230fff3a582a69779f8e432 (diff) | |
download | rockbox-0b29691324e5700f15ea653592bf29f8552d47d7.tar.gz rockbox-0b29691324e5700f15ea653592bf29f8552d47d7.tar.bz2 rockbox-0b29691324e5700f15ea653592bf29f8552d47d7.zip |
Move load_firmware() to separate file
The idea is to share loading code between bootloaders and rolo().
Change-Id: I1656ed91946d7a05cb7c9fa7a16793c3c862a5cd
Reviewed-on: http://gerrit.rockbox.org/190
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Diffstat (limited to 'bootloader/ondavx747.c')
-rw-r--r-- | bootloader/ondavx747.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c index 7b4615b10b..4d0bf4221c 100644 --- a/bootloader/ondavx747.c +++ b/bootloader/ondavx747.c @@ -29,6 +29,8 @@ #include "system.h" #include "button.h" #include "common.h" +#include "rb-loader.h" +#include "loader_strerror.h" #include "storage.h" #include "disk.h" #include "string.h" @@ -148,7 +150,7 @@ static int boot_rockbox(void) printf("Loading firmware..."); rc = load_firmware((unsigned char *)CONFIG_SDRAM_START, BOOTFILE, 0x400000); - if(rc < 0) + if(rc <= EFILE_EMPTY) return rc; else { @@ -303,8 +305,8 @@ int main(void) #endif rc = boot_rockbox(); - if(rc < 0) - printf("Error: %s", strerror(rc)); + if(rc <= EFILE_EMPTY) + printf("Error: %s", loader_strerror(rc)); /* Halt */ while (1) |