Hi Pali,
On 7/30/21 2:21 AM, Pali Rohár wrote:
On Friday 30 July 2021 01:39:11 Alejandro Colomar (man-pages) wrote:
user@sqli:/usr/include$ grep -rn 'struct termios {'
asm-generic/termbits.h:12:struct termios {
You have there a mistake. It is 'struct termios2', not 'struct termios'.
And for 'struct termios' it is more complicated as there are two
different 'struct termios'. One in file <bits/termios.h> (included from
<termios.h>) and one in file <asm-generic/termbits.h> (included from
<linux/termios.h>).
Function tcsetattr() uses 'struct termios' from <bits/termios.h> and
ioctl TCSETS uses 'struct termios' from <asm-generic/termbits.h>.
Right.
Anyway, it is in the same header:
user@sqli:/usr/include$ grep -rn 'struct termios2' | grep -v define
asm-generic/termbits.h:21:struct termios2 {
Regards,
Alex
user@sqli:/usr/include$ grep -rn '<asm-generic/termbits.h>'
x86_64-linux-gnu/asm/termbits.h:1:#include <asm-generic/termbits.h>
user@sqli:/usr/include$ grep -rn '<asm/termbits.h>'
asm-generic/termios.h:12:#include <asm/termbits.h>
user@sqli:/usr/include$ grep -rn '<asm-generic/termios.h>'
x86_64-linux-gnu/asm/termios.h:1:#include <asm-generic/termios.h>
user@sqli:/usr/include$ grep -rn '<asm/termios.h>'
linux/termios.h:6:#include <asm/termios.h>
user@sqli:/usr/include$ grep -rn '<linux/termios.h>'
user@sqli:/usr/include$
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/