summaryrefslogtreecommitdiffstats
path: root/bootloader/ipod.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-03-06 14:05:43 +0000
committerDave Chapman <dave@dchapman.com>2007-03-06 14:05:43 +0000
commita02c42617949e97c25f362ed03c2a8e142edddf0 (patch)
tree2f5fcbb0db6e78b71a4945fe65f39a3a1ae257b7 /bootloader/ipod.c
parenta74eefe1b21e3a20bd15ccb7663dcb63ac475b39 (diff)
downloadrockbox-a02c42617949e97c25f362ed03c2a8e142edddf0.tar.gz
rockbox-a02c42617949e97c25f362ed03c2a8e142edddf0.tar.bz2
rockbox-a02c42617949e97c25f362ed03c2a8e142edddf0.zip
Fix the loading of RetailOS from a file (apple_os.ipod in the root or .rockbox/)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12644 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ipod.c')
-rw-r--r--bootloader/ipod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index c2f7a83e83..fa592b6f49 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -332,7 +332,10 @@ void* main(void)
rc=load_firmware(loadbuffer, "apple_os.ipod", MAX_LOADSIZE);
- if(rc==EFILE_NOT_FOUND) {
+ if (rc == EOK) {
+ printf("apple_os.ipod loaded.");
+ return (void*)DRAM_START;
+ } else if (rc == EFILE_NOT_FOUND) {
/* If apple_os.ipod doesn't exist, then check if there is an Apple
firmware image in RAM */
haveretailos = (memcmp((void*)(DRAM_START+0x20),"portalplayer",12)==0);
@@ -344,9 +347,6 @@ void* main(void)
printf("Error!");
printf("Can't load apple_os.ipod:");
printf(strerror(rc));
- } else if (rc > 0) {
- printf("apple_os.ipod loaded.");
- return (void*)DRAM_START;
}
/* Everything failed - just loop forever */