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,
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;
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)