summaryrefslogtreecommitdiffstats
path: root/bootloader/ondavx747.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-06-23 05:08:36 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-06-23 05:08:36 +0000
commit1ec821244afc4f671c0c94519cd3a70b2777bf74 (patch)
tree748eead72f705c1e3a91120dc890be49617239c9 /bootloader/ondavx747.c
parent28bcc17ddef4cfad2d1a669869f2f81f0724acb9 (diff)
downloadrockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.tar.gz
rockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.tar.bz2
rockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.zip
Sansa AMS bootloader: enter USB mode only when needed
- If an error happens when reading partitions / rockbox.sansa - If the select button was pressed add an argument to error() to not power off, when we're going to enter USB mode to try to fix the problem, but display the error message anyway for debugging purpose git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27075 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ondavx747.c')
-rw-r--r--bootloader/ondavx747.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index 4dfc78d58c..2903b04252 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -94,7 +94,7 @@ static int boot_of(void)
printf("Mounting disk...");
rc = disk_mount_all();
if (rc <= 0)
- error(EDISK,rc);
+ error(EDISK, rc, true);
/* TODO: get this from the NAND flash instead of SD */
fd = open("/ccpmp.bin", O_RDONLY);
@@ -147,7 +147,7 @@ static int boot_rockbox(void)
printf("Mounting disk...");
rc = disk_mount_all();
if (rc <= 0)
- error(EDISK,rc);
+ error(EDISK,rc, true);
printf("Loading firmware...");
rc = load_firmware((unsigned char *)CONFIG_SDRAM_START, BOOTFILE, 0x400000);
@@ -172,7 +172,7 @@ static void reset_configuration(void)
rc = disk_mount_all();
if (rc <= 0)
- error(EDISK,rc);
+ error(EDISK,rc, true);
if(rename(ROCKBOX_DIR "/config.cfg", ROCKBOX_DIR "/config.old") == 0)
show_splash(HZ/2, "Configuration reset successfully!");
@@ -271,7 +271,7 @@ int main(void)
rc = storage_init();
if(rc)
- error(EATA, rc);
+ error(EATA, rc, true);
/* Don't mount the disks yet, there could be file system/partition errors
which are fixable in USB mode */