summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-11-08 19:31:19 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-11-08 19:31:19 +0000
commit81449d96421edd1fcd22c288102b7f192e7e7cd4 (patch)
treea345a00d2fc358dfcfa5e97ce49f812fbe3f2db2 /firmware/drivers
parent8cff523ac10e57968ced327b39c41d230507adfd (diff)
downloadrockbox-81449d96421edd1fcd22c288102b7f192e7e7cd4.tar.gz
rockbox-81449d96421edd1fcd22c288102b7f192e7e7cd4.zip
fat_cache_sector() wrote to the wrong sector when flushing an entry. Thanks to Greg Haerr for finding the bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2813 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/fat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index fc6b33b4c1..860e47df00 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -400,7 +400,8 @@ static void *cache_fat_sector(int fatsector)
400 /* Write back if it is dirty */ 400 /* Write back if it is dirty */
401 if(fat_cache[cache_index].dirty) 401 if(fat_cache[cache_index].dirty)
402 { 402 {
403 if(ata_write_sectors(secnum + fat_bpb.startsector, 1, 403 if(ata_write_sectors(fat_cache[cache_index].secnum +
404 fat_bpb.startsector, 1,
404 fat_cache_sectors[cache_index])) 405 fat_cache_sectors[cache_index]))
405 { 406 {
406 panicf("cache_fat_sector() - Could not write sector %d\n", 407 panicf("cache_fat_sector() - Could not write sector %d\n",