diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-23 05:08:36 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-23 05:08:36 +0000 |
commit | 1ec821244afc4f671c0c94519cd3a70b2777bf74 (patch) | |
tree | 748eead72f705c1e3a91120dc890be49617239c9 /bootloader/common.c | |
parent | 28bcc17ddef4cfad2d1a669869f2f81f0724acb9 (diff) | |
download | rockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.tar.gz 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/common.c')
-rw-r--r-- | bootloader/common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bootloader/common.c b/bootloader/common.c index 67b5816694..362c3b4d11 100644 --- a/bootloader/common.c +++ b/bootloader/common.c | |||
@@ -118,7 +118,7 @@ char *strerror(int error) | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | void error(int errortype, int error) | 121 | void error(int errortype, int error, bool shutdown) |
122 | { | 122 | { |
123 | switch(errortype) | 123 | switch(errortype) |
124 | { | 124 | { |
@@ -137,7 +137,8 @@ void error(int errortype, int error) | |||
137 | 137 | ||
138 | lcd_update(); | 138 | lcd_update(); |
139 | sleep(5*HZ); | 139 | sleep(5*HZ); |
140 | power_off(); | 140 | if(shutdown) |
141 | power_off(); | ||
141 | } | 142 | } |
142 | 143 | ||
143 | /* Load firmware image in a format created by tools/scramble */ | 144 | /* Load firmware image in a format created by tools/scramble */ |