summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-03-07 14:38:30 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-03-07 14:38:30 +0000
commitd1c459c746ab79c9bfb6b84aed2e7f60b57db94f (patch)
treea9c79352a26cd582f2e5db3d8cf443f5146fca63
parentc71db259dc198a26aadba017d29fc7c8b76be194 (diff)
downloadrockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.tar.gz
rockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.zip
Little fix, when debug is disabled clusterchain length was incorrectly computed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6163 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/fat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index df89db3651..79b9dc03d3 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -1782,8 +1782,10 @@ int fat_closewrite(struct fat_file *file, long size, int attr)
1782 long len; 1782 long len;
1783 long next; 1783 long next;
1784 for ( next = file->firstcluster; next; 1784 for ( next = file->firstcluster; next;
1785 next = get_next_cluster(IF_MV2(fat_bpb,) next) ) 1785 next = get_next_cluster(IF_MV2(fat_bpb,) next) ) {
1786 LDEBUGF("cluster %ld: %lx\n", count++, next); 1786 LDEBUGF("cluster %ld: %lx\n", count, next);
1787 count++;
1788 }
1787 len = count * fat_bpb->bpb_secperclus * SECTOR_SIZE; 1789 len = count * fat_bpb->bpb_secperclus * SECTOR_SIZE;
1788 LDEBUGF("File is %ld clusters (chainlen=%ld, size=%ld)\n", 1790 LDEBUGF("File is %ld clusters (chainlen=%ld, size=%ld)\n",
1789 count, len, size ); 1791 count, len, size );