Allow any partition type, not just known FAT types.
Instead of only mounting partitions with a FAT partition type, try any partition that isn't type 0 (unallocated) or 5 (extended). This makes it easier to reformat SDXC cards which have the exFAT partition type, and also brings us in line with pretty much every other OS at this point. Anything with a valid-looking FAT superblock will get mounted. original author: Torne Wuff <torne@wolfpuppy.org.uk> Change-Id: I3ea8d437a79f9da270f9d119cc670e472331a9da
This commit is contained in:
parent
3cfd129cd9
commit
a2b8204718
1 changed files with 2 additions and 3 deletions
|
@ -200,9 +200,8 @@ int disk_mount(int drive)
|
|||
volume != -1 && i < 4 && mounted < NUM_VOLUMES_PER_DRIVE;
|
||||
i++)
|
||||
{
|
||||
if (memchr(fat_partition_types, pinfo[i].type,
|
||||
sizeof(fat_partition_types)) == NULL)
|
||||
continue; /* not an accepted partition type */
|
||||
if (pinfo[i].type == 0 || pinfo[i].type == 5)
|
||||
continue; /* skip free/extended partitions */
|
||||
|
||||
#ifdef MAX_LOG_SECTOR_SIZE
|
||||
for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1)
|
||||
|
|
Loading…
Reference in a new issue