patch-2.3.99-pre1 linux/fs/adfs/dir.c
Next file: linux/fs/affs/super.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Mon Mar 13 13:55:09 2000
- Orig file:
v2.3.51/linux/fs/adfs/dir.c
- Orig date:
Tue Mar 7 14:32:26 2000
diff -u --recursive --new-file v2.3.51/linux/fs/adfs/dir.c linux/fs/adfs/dir.c
@@ -1,10 +1,11 @@
/*
* linux/fs/adfs/dir.c
*
- * Copyright (C) 1999 Russell King
+ * Copyright (C) 1999-2000 Russell King
*
* Common directory handling for ADFS
*/
+#include <linux/config.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/fs.h>
@@ -33,13 +34,16 @@
struct adfs_dir_ops *ops = sb->u.adfs_sb.s_dir;
struct object_info obj;
struct adfs_dir dir;
- int ret;
+ int ret = 0;
+
+ if (filp->f_pos >> 32)
+ goto out;
ret = ops->read(sb, inode->i_ino, inode->i_size, &dir);
if (ret)
goto out;
- switch (filp->f_pos) {
+ switch ((unsigned long)filp->f_pos) {
case 0:
if (filldir(dirent, ".", 1, 0, inode->i_ino) < 0)
goto free_out;
@@ -79,13 +83,14 @@
int
adfs_dir_update(struct super_block *sb, struct object_info *obj)
{
+ int ret = -EINVAL;
+#ifdef CONFIG_ADFS_FS_RW
struct adfs_dir_ops *ops = sb->u.adfs_sb.s_dir;
struct adfs_dir dir;
- int ret = -EINVAL;
printk(KERN_INFO "adfs_dir_update: object %06X in dir %06X\n",
obj->file_id, obj->parent_id);
-#if 0
+
if (!ops->update) {
ret = -EINVAL;
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)