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/sansa_as3525.c | |
parent | 46ea8bfe7c690c8db230fff3a582a69779f8e432 (diff) |
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/sansa_as3525.c')
-rw-r--r-- | bootloader/sansa_as3525.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c index c21f51a7ad..b28ccf43e7 100644 --- a/bootloader/sansa_as3525.c +++ b/bootloader/sansa_as3525.c @@ -35,6 +35,8 @@ #include "backlight.h" #include "button-target.h" #include "common.h" +#include "rb-loader.h" +#include "loader_strerror.h" #include "storage.h" #include "disk.h" #include "panic.h" @@ -147,7 +149,7 @@ void main(void) loadbuffer = (unsigned char*)DRAM_ORIG; /* DRAM */ buffer_size = (int)(loadbuffer + (DRAM_SIZE) - TTB_SIZE); - while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) < 0) + while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY) { #ifdef USE_ROCKBOX_USB error(EBOOTFILE, ret, false); |