mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
tty: Retire zombie dtrwait
Nothing uses dtrwait anymore. This was elimianted with the tty mpsafe rewrite for FreeBSD 8. Only these zombie symbols and functionality remain. GC them. Add comcontrol to the list things to remove in 16.0. Sponsored by: Netflix Reviewed by: kevans, emaste Differential Revision: https://reviews.freebsd.org/D52317
This commit is contained in:
@@ -1,13 +1,17 @@
|
|||||||
.Dd May 15, 1994
|
.Dd August 31, 2025
|
||||||
.Dt COMCONTROL 8
|
.Dt COMCONTROL 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm comcontrol
|
.Nm comcontrol
|
||||||
.Nd control a special tty device
|
.Nd control a special tty device
|
||||||
|
.Sh DEPRECATION NOTICE
|
||||||
|
The
|
||||||
|
.Nm
|
||||||
|
utility is deprecated and will be removed in
|
||||||
|
.Fx 16.0 .
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Ar special_device
|
.Ar special_device
|
||||||
.Op dtrwait Ar number
|
|
||||||
.Op drainwait Ar number
|
.Op drainwait Ar number
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
@@ -22,13 +26,6 @@ Only the superuser can change the settings.
|
|||||||
.Pp
|
.Pp
|
||||||
The following options are available:
|
The following options are available:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Cm dtrwait Ar number
|
|
||||||
Set the time to wait after dropping DTR
|
|
||||||
to the given number.
|
|
||||||
The units are hundredths of a second.
|
|
||||||
The default is 300 hundredths, i.e., 3 seconds.
|
|
||||||
This option needed mainly to set proper recover time after
|
|
||||||
modem reset.
|
|
||||||
.It Cm drainwait Ar number
|
.It Cm drainwait Ar number
|
||||||
Set the time to wait for output drain
|
Set the time to wait for output drain
|
||||||
to the given number.
|
to the given number.
|
||||||
@@ -57,7 +54,6 @@ dialout devices
|
|||||||
Originally part of cgd's com package patches, version 0.2.1, to
|
Originally part of cgd's com package patches, version 0.2.1, to
|
||||||
.Bx 386 0.1 .
|
.Bx 386 0.1 .
|
||||||
Once controlled bidirectional capabilities.
|
Once controlled bidirectional capabilities.
|
||||||
Little is left to control now
|
Little is left to control now that these capabilities are standard.
|
||||||
that these capabilities are standard.
|
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An Christopher G. Demetriou
|
.An Christopher G. Demetriou
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ static void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: comcontrol <filename> [dtrwait <n>] [drainwait <n>]\n");
|
"usage: comcontrol <filename> [drainwait <n>]\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
int print_dtrwait = 1, print_drainwait = 1;
|
int print_drainwait = 1;
|
||||||
int dtrwait = -1, drainwait = -1;
|
int drainwait = -1;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
usage();
|
usage();
|
||||||
@@ -71,13 +71,6 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
if (ioctl(fd, TIOCMGDTRWAIT, &dtrwait) < 0) {
|
|
||||||
print_dtrwait = 0;
|
|
||||||
if (errno != ENOTTY) {
|
|
||||||
res = 1;
|
|
||||||
warn("TIOCMGDTRWAIT");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ioctl(fd, TIOCGDRAINWAIT, &drainwait) < 0) {
|
if (ioctl(fd, TIOCGDRAINWAIT, &drainwait) < 0) {
|
||||||
print_drainwait = 0;
|
print_drainwait = 0;
|
||||||
if (errno != ENOTTY) {
|
if (errno != ENOTTY) {
|
||||||
@@ -85,21 +78,12 @@ main(int argc, char *argv[])
|
|||||||
warn("TIOCGDRAINWAIT");
|
warn("TIOCGDRAINWAIT");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (print_dtrwait)
|
|
||||||
printf("dtrwait %d ", dtrwait);
|
|
||||||
if (print_drainwait)
|
if (print_drainwait)
|
||||||
printf("drainwait %d ", drainwait);
|
printf("drainwait %d ", drainwait);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
} else {
|
} else {
|
||||||
while (argv[2] != NULL) {
|
while (argv[2] != NULL) {
|
||||||
if (!strcmp(argv[2],"dtrwait")) {
|
if (!strcmp(argv[2],"drainwait")) {
|
||||||
if (dtrwait >= 0)
|
|
||||||
usage();
|
|
||||||
if (argv[3] == NULL || !isdigit(argv[3][0]))
|
|
||||||
usage();
|
|
||||||
dtrwait = atoi(argv[3]);
|
|
||||||
argv += 2;
|
|
||||||
} else if (!strcmp(argv[2],"drainwait")) {
|
|
||||||
if (drainwait >= 0)
|
if (drainwait >= 0)
|
||||||
usage();
|
usage();
|
||||||
if (argv[3] == NULL || !isdigit(argv[3][0]))
|
if (argv[3] == NULL || !isdigit(argv[3][0]))
|
||||||
@@ -109,12 +93,6 @@ main(int argc, char *argv[])
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
if (dtrwait >= 0) {
|
|
||||||
if (ioctl(fd, TIOCMSDTRWAIT, &dtrwait) < 0) {
|
|
||||||
res = 1;
|
|
||||||
warn("TIOCMSDTRWAIT");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (drainwait >= 0) {
|
if (drainwait >= 0) {
|
||||||
if (ioctl(fd, TIOCSDRAINWAIT, &drainwait) < 0) {
|
if (ioctl(fd, TIOCSDRAINWAIT, &drainwait) < 0) {
|
||||||
res = 1;
|
res = 1;
|
||||||
|
|||||||
+2
-2
@@ -69,8 +69,8 @@
|
|||||||
/* 89-91 conflicts: tun and tap */
|
/* 89-91 conflicts: tun and tap */
|
||||||
#define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp
|
#define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp
|
||||||
* of last input event */
|
* of last input event */
|
||||||
#define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */
|
/* TIOCMGDTRWAIT _IOR('t', 90, int) * was modem: get wait on close */
|
||||||
#define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */
|
/* TIOCMSDTRWAIT _IOW('t', 91, int) * was modem: set wait on close */
|
||||||
/* 92-93 tun and tap */
|
/* 92-93 tun and tap */
|
||||||
/* 94-97 conflicts: tun and tap */
|
/* 94-97 conflicts: tun and tap */
|
||||||
#define TIOCDRAIN _IO('t', 94) /* wait till output drained */
|
#define TIOCDRAIN _IO('t', 94) /* wait till output drained */
|
||||||
|
|||||||
Reference in New Issue
Block a user