forked from len0rd/rockbox
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
This commit is contained in:
parent
c71db259dc
commit
d1c459c746
1 changed files with 4 additions and 2 deletions
|
@ -1782,8 +1782,10 @@ int fat_closewrite(struct fat_file *file, long size, int attr)
|
||||||
long len;
|
long len;
|
||||||
long next;
|
long next;
|
||||||
for ( next = file->firstcluster; next;
|
for ( next = file->firstcluster; next;
|
||||||
next = get_next_cluster(IF_MV2(fat_bpb,) next) )
|
next = get_next_cluster(IF_MV2(fat_bpb,) next) ) {
|
||||||
LDEBUGF("cluster %ld: %lx\n", count++, next);
|
LDEBUGF("cluster %ld: %lx\n", count, next);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
len = count * fat_bpb->bpb_secperclus * SECTOR_SIZE;
|
len = count * fat_bpb->bpb_secperclus * SECTOR_SIZE;
|
||||||
LDEBUGF("File is %ld clusters (chainlen=%ld, size=%ld)\n",
|
LDEBUGF("File is %ld clusters (chainlen=%ld, size=%ld)\n",
|
||||||
count, len, size );
|
count, len, size );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue