summaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
committer <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
commite7c2a72e2680827d6a733931273a93461c0d8d1b (patch)
treec9abeda78ef7504062bb2e816bcf3e3c9d680112 /fs/read_write.c
parentec6044459060a8c9ce7f64405c465d141898548c (diff)
Import of Linux/MIPS 1.3.0
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 5f457b9cb..1cd19d57a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -9,40 +9,10 @@
#include <linux/stat.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/mm.h>
#include <asm/segment.h>
-/*
- * Count is now a supported feature, but currently only the ext2fs
- * uses it. A count value of 1 is supported for compatibility with
- * earlier libraries, but larger values are supported: count should
- * indicate the total buffer space available for filling with dirents.
- * The d_off entry in the dirents will then indicate the offset from
- * each dirent to the next, and the return value will indicate the
- * number of bytes written. All dirents will be written at
- * word-aligned addresses. [sct Oct 1994]
- */
-asmlinkage int sys_readdir(unsigned int fd, struct dirent * dirent, unsigned int count)
-{
- int error;
- struct file * file;
- struct inode * inode;
-
- if (fd >= NR_OPEN || !(file = current->files->fd[fd]) ||
- !(inode = file->f_inode))
- return -EBADF;
- error = -ENOTDIR;
- if (file->f_op && file->f_op->readdir) {
- int size = count;
- if (count == 1)
- size = sizeof(*dirent);
- error = verify_area(VERIFY_WRITE, dirent, size);
- if (!error)
- error = file->f_op->readdir(inode,file,dirent,count);
- }
- return error;
-}
-
asmlinkage int sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
{
struct file * file;