diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-08 00:07:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-08 00:07:55 -0700 |
commit | dc5c72458480bb0b5e8abfa9a2968a9603c74dcf (patch) | |
tree | 22b946604505b3a0acc0781a0b3370da6b6ffc18 /fs | |
parent | f7a4bc7ee10c8e39e80b3e84f227a5752b0092d9 (diff) | |
download | history-dc5c72458480bb0b5e8abfa9a2968a9603c74dcf.tar.gz |
Remove ESPIPE logic from drivers, letting the VFS layer handle it instead.
This cleans up and simplifies drivers, and also allows us future
simplification in the VFS layer, since it removes knowledge about
internal VFS layer handling of "f_pos".
Diffstat (limited to 'fs')
-rw-r--r-- | fs/devfs/base.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/devfs/base.c b/fs/devfs/base.c index b0fb34873825fd..a62d9412e73eb1 100644 --- a/fs/devfs/base.c +++ b/fs/devfs/base.c @@ -857,12 +857,14 @@ static int devfsd_close(struct inode *inode, struct file *file); static ssize_t stat_read(struct file *file, char __user *buf, size_t len, loff_t * ppos); static struct file_operations stat_fops = { + .open = nonseekable_open, .read = stat_read, }; #endif /* Devfs daemon file operations */ static struct file_operations devfsd_fops = { + .open = nonseekable_open, .read = devfsd_read, .ioctl = devfsd_ioctl, .release = devfsd_close, @@ -2574,9 +2576,6 @@ static ssize_t devfsd_read(struct file *file, char __user *buf, size_t len, struct devfsd_notify_struct *info = fs_info->devfsd_info; DECLARE_WAITQUEUE(wait, current); - /* Can't seek (pread) on this device */ - if (ppos != &file->f_pos) - return -ESPIPE; /* Verify the task has grabbed the queue */ if (fs_info->devfsd_task != current) return -EPERM; @@ -2763,9 +2762,6 @@ static ssize_t stat_read(struct file *file, char __user *buf, size_t len, num = sprintf(txt, "Number of entries: %u number of bytes: %u\n", stat_num_entries, stat_num_bytes) + 1; - /* Can't seek (pread) on this device */ - if (ppos != &file->f_pos) - return -ESPIPE; if (*ppos >= num) return 0; if (*ppos + len > num) |