Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ssize_t uread(struct file *file, char __user *buf, size_t count, loff_t *pos)
  2. {
  3. #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
  4. return p__vfs_read(file, buf, count, pos);
  5. #endif
  6. if (file->f_op->read)
  7. return file->f_op->read(file, buf, count, pos);
  8. #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
  9. if (file->f_op->aio_read)
  10. return do_sync_read(file, buf, count, pos);
  11. if (file->f_op->read_iter)
  12. return new_sync_read(file, buf, count, pos);
  13. return -EINVAL;
  14. #else
  15. return do_sync_read(file, buf, count, pos);
  16. #endif
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement