From a02c42617949e97c25f362ed03c2a8e142edddf0 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Tue, 6 Mar 2007 14:05:43 +0000 Subject: [PATCH] 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 --- bootloader/ipod.c | 8 ++++---- 1 file 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 */