From 1ec821244afc4f671c0c94519cd3a70b2777bf74 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Wed, 23 Jun 2010 05:08:36 +0000 Subject: 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 --- bootloader/ondavx747.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bootloader/ondavx747.c') 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 */ -- cgit