summaryrefslogtreecommitdiffstats
path: root/bootloader/iriver_h1x0.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/iriver_h1x0.c
parent46ea8bfe7c690c8db230fff3a582a69779f8e432 (diff)
downloadrockbox-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/iriver_h1x0.c')
-rw-r--r--bootloader/iriver_h1x0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index 9042737406..77624526e5 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -46,6 +46,8 @@
#include "eeprom_settings.h"
#include "rbunicode.h"
#include "common.h"
+#include "rb-loader.h"
+#include "loader_strerror.h"
#include "version.h"
#include <stdarg.h>
@@ -608,9 +610,9 @@ void main(void)
printf("Loading firmware");
i = load_firmware((unsigned char *)DRAM_START, BOOTFILE, MAX_LOADSIZE);
if(i < 0)
- printf("Error: %s", strerror(i));
+ printf("Error: %s", loader_strerror(i));
- if (i == EOK)
+ if (i > 0)
start_firmware();
if (!detect_original_firmware())