OSDN Git Service

Fixed FAT size calculation.
authorresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Wed, 24 Nov 2010 20:09:25 +0000 (20:09 +0000)
committerresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Wed, 24 Nov 2010 20:09:25 +0000 (20:09 +0000)
git-svn-id: http://exfat.googlecode.com/svn/trunk@182 60bc1c72-a15a-11de-b98f-4500b42dc123

mkfs/fat.c

index ecbe822..3f470cf 100644 (file)
@@ -33,7 +33,7 @@ off_t fat_alignment(void)
 
 off_t fat_size(void)
 {
-       return (off_t) le32_to_cpu(sb.cluster_count) * sizeof(cluster_t);
+       return (off_t) le32_to_cpu(sb.fat_block_count) * BLOCK_SIZE(sb);
 }
 
 static cluster_t fat_write_entry(cluster_t cluster, cluster_t value, int fd)