summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man2/ioctl_tty.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man2/ioctl_tty.2
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/ioctl_tty.2')
-rw-r--r--upstream/opensuse-tumbleweed/man2/ioctl_tty.253
1 files changed, 31 insertions, 22 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/ioctl_tty.2 b/upstream/opensuse-tumbleweed/man2/ioctl_tty.2
index dfbd9a87..6731d4e4 100644
--- a/upstream/opensuse-tumbleweed/man2/ioctl_tty.2
+++ b/upstream/opensuse-tumbleweed/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-05-02 "Linux man-pages (unreleased)"
.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 <andries.brouwer@cwi.nl>
.\" 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 <linux/serial.h>"
-.\" .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 <fcntl.h>
@@ -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 */