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
This commit is contained in:
parent
a74eefe1b2
commit
a02c426179
1 changed files with 4 additions and 4 deletions
|
@ -332,7 +332,10 @@ void* main(void)
|
||||||
|
|
||||||
rc=load_firmware(loadbuffer, "apple_os.ipod", MAX_LOADSIZE);
|
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
|
/* If apple_os.ipod doesn't exist, then check if there is an Apple
|
||||||
firmware image in RAM */
|
firmware image in RAM */
|
||||||
haveretailos = (memcmp((void*)(DRAM_START+0x20),"portalplayer",12)==0);
|
haveretailos = (memcmp((void*)(DRAM_START+0x20),"portalplayer",12)==0);
|
||||||
|
@ -344,9 +347,6 @@ void* main(void)
|
||||||
printf("Error!");
|
printf("Error!");
|
||||||
printf("Can't load apple_os.ipod:");
|
printf("Can't load apple_os.ipod:");
|
||||||
printf(strerror(rc));
|
printf(strerror(rc));
|
||||||
} else if (rc > 0) {
|
|
||||||
printf("apple_os.ipod loaded.");
|
|
||||||
return (void*)DRAM_START;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Everything failed - just loop forever */
|
/* Everything failed - just loop forever */
|
||||||
|
|
Loading…
Reference in a new issue