diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2007-03-20 10:36:26 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2007-03-20 10:36:26 +0000 |
commit | 0c1a304620432e16f897e3ff36d28b76f0eb22b8 (patch) | |
tree | e006f977745ac1245fc96844e4c89721b7e87066 /bootloader | |
parent | 739ff041acc6a2407045a6c3a2b8bbc8cf8c8502 (diff) | |
download | rockbox-0c1a304620432e16f897e3ff36d28b76f0eb22b8.tar.gz rockbox-0c1a304620432e16f897e3ff36d28b76f0eb22b8.zip |
PP bootloader:
1) Proper error handling when we can't find the firmware.
2) Show verbose debug messages when any button is pressed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12847 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/main-pp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index e8a1667309..9ee3b84b8f 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c @@ -106,11 +106,9 @@ static void chksum_crc32gentab (void) /* Button definitions */ #if CONFIG_KEYPAD == IRIVER_H10_PAD -#define BOOTLOADER_VERBOSE BUTTON_PLAY #define BOOTLOADER_BOOT_OF BUTTON_LEFT #elif CONFIG_KEYPAD == SANSA_E200_PAD -#define BOOTLOADER_VERBOSE BUTTON_RIGHT #define BOOTLOADER_BOOT_OF BUTTON_LEFT #endif @@ -291,9 +289,9 @@ void* main(void) btn = button_read_device(); - /* Enable bootloader messages */ - if (btn & BOOTLOADER_VERBOSE) - verbose = true; + /* Enable bootloader messages if any button is pressed */ + if (btn) + verbose = true; lcd_setfont(FONT_SYSFIXED); @@ -379,6 +377,8 @@ void* main(void) } else { return (void*)loadbuffer; } + + error(EBOOTFILE, rc); } else { printf("Loading Rockbox..."); @@ -391,7 +391,7 @@ void* main(void) rc=load_firmware(loadbuffer, OLD_BOOTFILE, MAX_LOADSIZE); if (rc < EOK) { printf("Can't load %s:", OLD_BOOTFILE); - printf(strerror(rc)); + error(EBOOTFILE, rc); } } } |