summaryrefslogtreecommitdiff
path: root/bootloader/ipodnano2g.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/ipodnano2g.c
parent46ea8bfe7c690c8db230fff3a582a69779f8e432 (diff)
downloadrockbox-0b29691324e5700f15ea653592bf29f8552d47d7.tar.gz
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/ipodnano2g.c')
-rw-r--r--bootloader/ipodnano2g.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c
index be714c6273..c5fa6e2e65 100644
--- a/bootloader/ipodnano2g.c
+++ b/bootloader/ipodnano2g.c
@@ -44,6 +44,8 @@
44#include "power.h" 44#include "power.h"
45#include "file.h" 45#include "file.h"
46#include "common.h" 46#include "common.h"
47#include "rb-loader.h"
48#include "loader_strerror.h"
47#include "version.h" 49#include "version.h"
48 50
49/* Safety measure - maximum allowed firmware image size. 51/* Safety measure - maximum allowed firmware image size.
@@ -238,10 +240,10 @@ void main(void)
238 printf("Loading Rockbox..."); 240 printf("Loading Rockbox...");
239 rc=load_firmware(loadbuffer, BOOTFILE, MAX_LOADSIZE); 241 rc=load_firmware(loadbuffer, BOOTFILE, MAX_LOADSIZE);
240 242
241 if (rc != EOK) { 243 if (rc <= EFILE_EMPTY) {
242 printf("Error!"); 244 printf("Error!");
243 printf("Can't load " BOOTFILE ": "); 245 printf("Can't load " BOOTFILE ": ");
244 printf(strerror(rc)); 246 printf(loader_strerror(rc));
245 fatal_error(); 247 fatal_error();
246 } 248 }
247 249