diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-07-15 15:06:45 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-07-15 15:06:45 +0000 |
commit | de943a5bd16746efb8feaa92cce266f80994747c (patch) | |
tree | 5132dac62f8410b81e82e88f4cbf68c69510036b /apps | |
parent | f27cf011f78511a160ca3085929ea1c572198273 (diff) | |
download | rockbox-de943a5bd16746efb8feaa92cce266f80994747c.tar.gz rockbox-de943a5bd16746efb8feaa92cce266f80994747c.zip |
Added searching for FAT32 partition
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/main.c | 17 |
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[]; | |||
76 | 76 | ||
77 | void init(void) | 77 | void init(void) |
78 | { | 78 | { |
79 | int rc; | 79 | int rc, i; |
80 | struct partinfo* pinfo; | 80 | struct partinfo* pinfo; |
81 | 81 | ||
82 | system_init(); | 82 | system_init(); |
@@ -124,10 +124,17 @@ void init(void) | |||
124 | pinfo = disk_init(); | 124 | pinfo = disk_init(); |
125 | if (!pinfo) | 125 | if (!pinfo) |
126 | panicf("disk: NULL"); | 126 | panicf("disk: NULL"); |
127 | 127 | ||
128 | rc = fat_mount(pinfo[0].start); | 128 | for ( i=0; i<4; i++ ) { |
129 | if(rc) | 129 | if ( pinfo[i].type == PARTITION_TYPE_FAT32 ) { |
130 | panicf("mount: %d",rc); | 130 | rc = fat_mount(pinfo[i].start); |
131 | if(rc) | ||
132 | panicf("mount: %d",rc); | ||
133 | } | ||
134 | } | ||
135 | if ( i==4 ) { | ||
136 | panicf("No FAT32 partition!"); | ||
137 | } | ||
131 | 138 | ||
132 | settings_load(); | 139 | settings_load(); |
133 | global_settings.total_boots++; | 140 | global_settings.total_boots++; |