summaryrefslogtreecommitdiff
path: root/bootloader/sansa_as3525.c
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2012-03-04 15:34:29 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2013-06-27 13:50:11 +0200
commit0b29691324e5700f15ea653592bf29f8552d47d7 (patch)
tree00e4f77f28c813a493cd8af22170f486f6e82903 /bootloader/sansa_as3525.c
parent46ea8bfe7c690c8db230fff3a582a69779f8e432 (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.c4
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);