summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorne Wuff <torne@wolfpuppy.org.uk>2011-09-17 22:45:59 +0000
committerTorne Wuff <torne@wolfpuppy.org.uk>2011-09-17 22:45:59 +0000
commit36d04ac76e1334ace25ce34e221072ce70bc4a32 (patch)
tree6c3a634c46a00eb9151e3a0369b52849bff88f5e
parente14bda521d0e396777df4fdc965335e23e8805de (diff)
downloadrockbox-36d04ac76e1334ace25ce34e221072ce70bc4a32.tar.gz
rockbox-36d04ac76e1334ace25ce34e221072ce70bc4a32.zip
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. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30566 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/disk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c
index 3c1f01cc61..b77f2e294a 100644
--- a/firmware/common/disk.c
+++ b/firmware/common/disk.c
@@ -189,9 +189,8 @@ int disk_mount(int drive)
#endif
for (; 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
int j;