[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get_user/copy_from_user
Hi,
> [The "third" argument is traditionally char *argp, and will be so
> named for this discussion.]"""
>
> I got a feeling that ioctl can be used similar to printf (va_list,
> stdarg.h etc) and I can pass as many parameters to the ioctl as
> possible (though I wasn;t sure how to extract those parameters from
> the unsigned long arg in xtcsound_ioctl).
>
> If there's indeed a way to extract the parameters passed to ioctl
> using the unsigned long arg, please let me know. I guess, that would
> be bit cleaner way to do things.
Unless Linux has changed things you can only pass a third arg to ioctl,
not a 4th, etc. If many parameters need to be passed then the 3rd arg
is a pointer to a parameter block that both user and kernel agree on,
e.g. a struct in a header file.
Ralph.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/