summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-07-15 15:06:45 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-07-15 15:06:45 +0000
commitde943a5bd16746efb8feaa92cce266f80994747c (patch)
tree5132dac62f8410b81e82e88f4cbf68c69510036b /apps/main.c
parentf27cf011f78511a160ca3085929ea1c572198273 (diff)
Added searching for FAT32 partition
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/main.c b/apps/main.c
index 2062efa347..36a3f4e71d 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -76,7 +76,7 @@ extern int poolend[];
void init(void)
{
- int rc;
+ int rc, i;
struct partinfo* pinfo;
system_init();
@@ -124,10 +124,17 @@ void init(void)
pinfo = disk_init();
if (!pinfo)
panicf("disk: NULL");
-
- rc = fat_mount(pinfo[0].start);
- if(rc)
- panicf("mount: %d",rc);
+
+ for ( i=0; i<4; i++ ) {
+ if ( pinfo[i].type == PARTITION_TYPE_FAT32 ) {
+ rc = fat_mount(pinfo[i].start);
+ if(rc)
+ panicf("mount: %d",rc);
+ }
+ }
+ if ( i==4 ) {
+ panicf("No FAT32 partition!");
+ }
settings_load();
global_settings.total_boots++;