diff options
author | Jeff Bailey <jbailey@gnu.org> | 2003-07-28 01:48:26 +0000 |
---|---|---|
committer | Jeff Bailey <jbailey@gnu.org> | 2003-07-28 01:48:26 +0000 |
commit | 211ee30f24c0abf5fcd5df17451b738e32c2c2c5 (patch) | |
tree | e2281b39ab091d290441f038de849494e99a76ea /fatfs/inode.c | |
parent | 3099f96171c69d65a1b7add77e9a7356b073d92b (diff) | |
download | hurd-211ee30f24c0abf5fcd5df17451b738e32c2c2c5.tar.gz hurd-211ee30f24c0abf5fcd5df17451b738e32c2c2c5.tar.bz2 hurd-211ee30f24c0abf5fcd5df17451b738e32c2c2c5.zip |
2003-07-14 Marco Gerards <metgerards@student.han.nl>
* fat.c (fat_read_sblock): Don't test if the root dir size is a
multiple of sectors_per_cluster. Reported by Barry deFreese
(bddebian@cox.net).
* fatfs.h (LOG2_BLOCKS_PER_CLUSTER): New macro.
(FAT_FIRST_CLUSTER_BLOCK): Likewise.
(fat_first_cluster_byte): Macro removed.
* inode.c (read_node): Correctly setup diskfs_root_node for FAT32
filesystems.
* pager.c (fat_getcluster): Check for reading beyond allocsize
correctly for file systems with a clustersize > vm_page_size.
(file_pager_read_small_page): Don't use byte offsets when
calculating the block.
(file_pager_read_huge_page): Likewise.
(pending_clusters_write): Likewise.
(file_pager_write_small_page): Likewise.
(STAT_INC): Cast to void to suppress warning.
Diffstat (limited to 'fatfs/inode.c')
-rw-r--r-- | fatfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fatfs/inode.c b/fatfs/inode.c index 50f8662b..b341f188 100644 --- a/fatfs/inode.c +++ b/fatfs/inode.c @@ -329,8 +329,8 @@ read_node (struct node *np, vm_address_t buf) st->st_mode = S_IFDIR | 0777; /* When we read in the node the first time, diskfs_root_node is zero. */ - if (diskfs_root_node == 0 || - (np == diskfs_root_node && (fat_type == FAT12 || fat_type == FAT16))) + if ((diskfs_root_node == 0 || np == diskfs_root_node) && + (fat_type = FAT12 || fat_type == FAT16)) { st->st_size = read_dword (dr->file_size); np->allocsize = nr_of_root_dir_sectors << log2_bytes_per_sector; |