Open rhulme opened 4 years ago
@rhulme can you point to any documentation on this? I can't find anything specific about this. The only thing I can find is this on the ioctl
man page:
The third argument is an untyped pointer to memory. It's traditionally char argp (from the days before void was valid C), and will be so named for this discussion.
@rhulme can you point to any documentation on this? I can't find anything specific about this. The only thing I can find is this on the
ioctl
man page:The third argument is an untyped pointer to memory. It's traditionally char argp (from the days before void was valid C), and will be so named for this discussion.
@wjwwood : ioctl is a variadic function. It's up to the function itself to decide how many parameters it expects after the fixed parameters (in this case two) and what type they are. So the same way printf decides how to interpret the parameters that come after the format string.
As ioctl is a general-purpose interface for pretty much any kind of driver, the number and meaning of the parameters will vary from driver to driver (or at least between classes of driver).
The commands and parameters for the TTY class are described here:
https://man7.org/linux/man-pages/man4/tty_ioctl.4.html
TIOCMIWAIT
Argument: int arg
Just pinging this as the PR is still marked as "awaiting feedback" but I provided feedback in June 2021.
ioctl call TIOCMIWAIT expects the flags as an immediate parameter, not a pointer.