summaryrefslogtreecommitdiff
path: root/fatfs
diff options
context:
space:
mode:
Diffstat (limited to 'fatfs')
-rw-r--r--fatfs/ChangeLog5
-rw-r--r--fatfs/pager.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/fatfs/ChangeLog b/fatfs/ChangeLog
index 3528d25d..56fdb4d0 100644
--- a/fatfs/ChangeLog
+++ b/fatfs/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-17 Marcus Brinkmann <marcus@gnu.org>
+
+ * pager.c (find_cluster): Round to cluster size rather than adding
+ cluster size.
+
2003-07-14 Marco Gerards <metgerards@student.han.nl>
* fat.c (fat_read_sblock): Don't test if the root dir size is a
diff --git a/fatfs/pager.c b/fatfs/pager.c
index 61cf7cf7..ef5a945b 100644
--- a/fatfs/pager.c
+++ b/fatfs/pager.c
@@ -106,7 +106,7 @@ find_cluster (struct node *node, vm_offset_t offset,
rwlock_reader_lock (*lock);
}
- if (offset + bytes_per_cluster > node->allocsize)
+ if (round_cluster (offset) > node->allocsize)
return EIO;
err = fat_getcluster (node, offset >> log2_bytes_per_cluster, 0, cluster);