char device catch multiple (int) ioctl-arguments
I have to write a linux char device, which handles ioctl (without BKL) functions per unlock_ioctl. At the moment I can receive one argument from the userspace ioctl command per __get_user(myint, (int __user *) arg); How can I receive multiple int-arguments (for example this call)?: ioctl(fp, SZ_NEW_DEV_FORMAT, 0, 1, 30); Yes, you have to use structures. For a particular ioctl command there will be some predefined arguments. You need to wrap these all arguments into a structure object and pass in the address of the object. In side the kernel, you need to type cast the given arg to structure