summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-15 08:52:59 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-15 08:52:59 +0000
commit71651cacb62540bd67b56029d551a3ccdeb3c81c (patch)
treeadd48793d0fe87bb5cd18cef4506c676998e55cd /bootloader
parent3a1127785b9f29e526b2ab845efe0a313699c459 (diff)
downloadrockbox-71651cacb62540bd67b56029d551a3ccdeb3c81c.tar.gz
rockbox-71651cacb62540bd67b56029d551a3ccdeb3c81c.tar.bz2
rockbox-71651cacb62540bd67b56029d551a3ccdeb3c81c.zip
Fix r29053 red and a leftover use of 'usb' variable as a bool rather than int in main-pp.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29054 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/main-pp.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 3670a7dc97..c8102dd0cc 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -44,8 +44,8 @@
#include "i2c.h"
#include "backlight-target.h"
#endif
-#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)
#include "usb.h"
+#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200)
#include "usb_drv.h"
#endif
#include "usb-target.h"
@@ -515,17 +515,8 @@ static int handle_usb(int connect_timeout)
return usb;
}
-#else /* !HAVE_BOOTLOADER_USB_MODE */
-
-#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
- || defined (SANSA_VIEW)
-/* Ignore cable state */
-static int handle_usb(int connect_timeout)
-{
- return USB_EXTRACTED;
- (void)connect_timeout;
-}
-#else
+#elif (defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
+ || defined (SANSA_VIEW)) && !defined(USB_ROCKBOX_USB)
/* Return USB_INSERTED if cable present */
static int handle_usb(int connect_timeout)
{
@@ -546,6 +537,14 @@ static int handle_usb(int connect_timeout)
return usb;
(void)connect_timeout;
}
+#else
+/* Ignore cable state */
+static int handle_usb(int connect_timeout)
+{
+ return USB_EXTRACTED;
+ (void)connect_timeout;
+}
+#else
#endif
#endif /* HAVE_BOOTLOADER_USB_MODE */
@@ -692,7 +691,8 @@ void* main(void)
pinfo = disk_partinfo(1);
if(pinfo->type == PARTITION_TYPE_OS2_HIDDEN_C_DRIVE)
{
- rc = load_mi4_part(loadbuffer, pinfo, MAX_LOADSIZE, usb);
+ rc = load_mi4_part(loadbuffer, pinfo, MAX_LOADSIZE,
+ usb == USB_INSERTED);
if (rc < EOK) {
printf("Can't load from partition");
printf(strerror(rc));