patch-2.3.42 linux/fs/qnx4/dir.c
Next file: linux/fs/qnx4/inode.c
Previous file: linux/fs/qnx4/bitmap.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Mon Jan 31 15:40:23 2000
- Orig file:
v2.3.41/linux/fs/qnx4/dir.c
- Orig date:
Tue Jan 11 22:31:43 2000
diff -u --recursive --new-file v2.3.41/linux/fs/qnx4/dir.c linux/fs/qnx4/dir.c
@@ -35,13 +35,13 @@
QNX4DEBUG(("filp->f_pos = %ld\n", (long) filp->f_pos));
while (filp->f_pos < inode->i_size) {
- blknum = qnx4_block_map( inode, filp->f_pos / QNX4_BLOCK_SIZE );
+ blknum = qnx4_block_map( inode, filp->f_pos >> QNX4_BLOCK_SIZE_BITS );
bh = bread(inode->i_dev, blknum, QNX4_BLOCK_SIZE);
if(bh==NULL) {
printk(KERN_ERR "qnx4_readdir: bread failed (%ld)\n", blknum);
break;
}
- ix = (filp->f_pos / QNX4_DIR_ENTRY_SIZE - (filp->f_pos / QNX4_BLOCK_SIZE) * QNX4_INODES_PER_BLOCK) % QNX4_INODES_PER_BLOCK;
+ ix = (int)(filp->f_pos >> QNX4_DIR_ENTRY_SIZE_BITS) % QNX4_INODES_PER_BLOCK;
while (ix < QNX4_INODES_PER_BLOCK) {
offset = ix * QNX4_DIR_ENTRY_SIZE;
de = (struct qnx4_inode_entry *) (bh->b_data + offset);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)