Guest User

Untitled

a guest
Jun 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. which default implementation for drivers/hid/hid-cando.c driver, the driver does not implement neither of '.ioctl' nor '.unlocked_ioctl'
  2.  
  3. in file: fs/ioctl.c I traced a user space ioctl to the following kernel function, however I am stuck with either:
  4.  
  5. 'filp->f_op->unlocked_ioctl(filp, cmd, arg)'
  6. or
  7. 'filp->f_op->ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg)'
  8.  
  9. ------------------
  10. static long vfs_ioctl(struct file *filp, unsigned int cmd,
  11. unsigned long arg)
  12. {
  13. int error = -ENOTTY;
  14.  
  15. if (!filp->f_op)
  16. goto out;
  17.  
  18. if (filp->f_op->unlocked_ioctl) {
  19. error = filp->f_op->unlocked_ioctl(filp, cmd, arg);
  20. if (error == -ENOIOCTLCMD)
  21. error = -EINVAL;
  22. goto out;
  23. } else if (filp->f_op->ioctl) {
  24. lock_kernel();
  25. error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
  26. filp, cmd, arg);
  27. unlock_kernel();
  28. }
  29.  
  30. out:
  31. return error;
  32. }
  33. --------------------------------------------------------------
Add Comment
Please, Sign In to add comment