1
0
Fork 0
forked from len0rd/rockbox

Added searching for FAT32 partition

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1351 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-07-15 15:06:45 +00:00
parent f27cf011f7
commit de943a5bd1
2 changed files with 14 additions and 5 deletions

View file

@ -76,7 +76,7 @@ extern int poolend[];
void init(void)
{
int rc;
int rc, i;
struct partinfo* pinfo;
system_init();
@ -125,9 +125,16 @@ void init(void)
if (!pinfo)
panicf("disk: NULL");
rc = fat_mount(pinfo[0].start);
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++;

View file

@ -25,6 +25,8 @@ struct partinfo {
unsigned char type;
};
#define PARTITION_TYPE_FAT32 0x0c
/* returns a pointer to an array of 8 partinfo structs */
struct partinfo* disk_init(void);