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:
Moshe Piekarski 2011-09-17 22:45:59 +00:00 committed by Solomon Peachy
parent 3cfd129cd9
commit a2b8204718

View file

@ -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)