From 7fea1369034f4c10b22365e34493d4151e793fac Mon Sep 17 00:00:00 2001 From: Michael Sparmann Date: Sun, 2 Jan 2011 22:28:22 +0000 Subject: Autodetect sector size on superfloppy volumes based on the FAT32 BPB (kudos to Frank Gevaerts) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28946 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/disk.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/common') diff --git a/firmware/common/disk.c b/firmware/common/disk.c index 400d21f..a23d51d 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c @@ -223,6 +223,9 @@ int disk_mount(int drive) DEBUGF("No partition found, trying to mount sector 0.\n"); if (!fat_mount(IF_MV2(volume,) IF_MD2(drive,) 0)) { +#ifdef MAX_LOG_SECTOR_SIZE + disk_sector_multiplier = fat_get_bytes_per_sector(IF_MV(volume))/SECTOR_SIZE; +#endif mounted = 1; vol_drive[volume] = drive; /* remember the drive for this volume */ } -- cgit v1.1