From 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:07 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- man2/ioctl_tty.2 | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) (limited to 'man2/ioctl_tty.2') diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 index dfbd9a8..9d247ed 100644 --- a/man2/ioctl_tty.2 +++ b/man2/ioctl_tty.2 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH ioctl_tty 2 2023-05-03 "Linux man-pages 6.05.01" +.TH ioctl_tty 2 2024-03-03 "Linux man-pages 6.7" .SH NAME ioctl_tty \- ioctls for terminals and serial lines .SH LIBRARY @@ -17,25 +17,25 @@ Standard C library .BR " struct termios2" ", and" .BR " Bnnn" ", " BOTHER ", " CBAUD ", " CLOCAL , .BR " TC*" { FLUSH , ON , OFF "} and other constants */" -.PP -.BI "int ioctl(int " fd ", int " cmd ", ...);" +.P +.BI "int ioctl(int " fd ", int " op ", ...);" .fi .SH DESCRIPTION The .BR ioctl (2) -call for terminals and serial ports accepts many possible command arguments. +call for terminals and serial ports accepts many possible operation arguments. Most require a third argument, of varying type, here called .I argp or .IR arg . -.PP +.P Use of .BR ioctl () makes for nonportable programs. Use the POSIX interface described in .BR termios (3) whenever possible. -.PP +.P Please note that .B struct termios from @@ -87,7 +87,7 @@ Equivalent to .IP Allow the output buffer to drain, discard pending input, and set the current serial port settings. -.PP +.P The following four ioctls, added in Linux 2.6.20, .\" commit 64bb6c5e1ddcd47c951740485026ef08975ee2e6 .\" commit 592ee3a5e5e2a981ef2829a0380093006d045661 @@ -119,7 +119,7 @@ TCSETSW2 \fBconst struct termios2 *\fPargp TCSETSF2 \fBconst struct termios2 *\fPargp .TE .RE -.PP +.P The following four ioctls are just like .BR TCGETS , .BR TCSETS , @@ -182,9 +182,9 @@ Argument: .BI "const struct winsize\~*" argp .IP Set window size. -.PP +.P The struct used by these ioctls is defined as -.PP +.P .in +4n .EX struct winsize { @@ -195,7 +195,7 @@ struct winsize { }; .EE .in -.PP +.P When the window size changes, a .B SIGWINCH signal is sent to the @@ -334,6 +334,15 @@ Argument: .BI "const char\~*" argp .IP Insert the given byte in the input queue. +.IP +Since Linux 6.2, +.\" commit 690c8b804ad2eafbd35da5d3c95ad325ca7d5061 +.\" commit 83efeeeb3d04b22aaed1df99bc70a48fe9d22c4d +this operation may require the +.B CAP_SYS_ADMIN +capability (if the +.I dev.tty.legacy_tiocsti +sysctl variable is set to false). .SS Redirecting console output .TP .B TIOCCONS @@ -594,7 +603,7 @@ and similar library functions that have insecure APIs. .BR ptsname (3) with a pathname where a devpts filesystem has been mounted in a different mount namespace.) -.PP +.P The BSD ioctls .BR TIOCSTOP , .BR TIOCSTART , @@ -627,9 +636,9 @@ Argument: .BI "const int\~*" argp .IP Set the indicated modem bits. -.PP +.P The following bits are used by the above ioctls: -.PP +.P .TS lb l. TIOCM_LE DSR (data set ready/line enable) @@ -695,7 +704,7 @@ Set the CLOCAL flag in the structure when .RI * argp is nonzero, and clear it otherwise. -.PP +.P If the .B CLOCAL flag for a line is off, the hardware carrier detect (DCD) @@ -726,7 +735,7 @@ Get the .I tty_struct corresponding to .IR fd . -This command was removed in Linux 2.5.67. +This operation was removed in Linux 2.5.67. .\" commit b3506a09d15dc5aee6d4bb88d759b157016e1864 .\" Author: Andries E. Brouwer .\" Date: Tue Apr 1 04:42:46 2003 -0800 @@ -738,7 +747,7 @@ This command was removed in Linux 2.5.67. .\" .\" .SS Serial info .\" .BR "#include " -.\" .PP +.\" .P .\" .TP .\" .BI "TIOCGSERIAL struct serial_struct *" argp .\" Get serial info. @@ -755,10 +764,10 @@ to indicate the error. .SH ERRORS .TP .B EINVAL -Invalid command parameter. +Invalid operation parameter. .TP .B ENOIOCTLCMD -Unknown command. +Unknown operation. .TP .B ENOTTY Inappropriate @@ -768,7 +777,7 @@ Inappropriate Insufficient permission. .SH EXAMPLES Check the condition of DTR on the serial port. -.PP +.P .\" SRC BEGIN (tiocmget.c) .EX #include @@ -791,9 +800,9 @@ main(void) } .EE .\" SRC END -.PP +.P Get or set arbitrary baudrate on the serial port. -.PP +.P .\" SRC BEGIN (tcgets.c) .EX /* SPDX-License-Identifier: GPL-2.0-or-later */ -- cgit v1.2.3