diff options
| author | scottr <scottr@NetBSD.org> | 1997-10-20 08:07:47 +0000 |
|---|---|---|
| committer | scottr <scottr@NetBSD.org> | 1997-10-20 08:07:47 +0000 |
| commit | 94cf43326671be278a503418bb30cf2fdf04a2d9 (patch) | |
| tree | 3e1b2361747f5e13c9d9a5552a879578fa9aaa0a /sbin | |
| parent | f0b760476019578eb56e0dd670349a2f6b780dd2 (diff) | |
Add support for DTR/CTS flow control, from Bill Studenmund.
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/slattach/slattach.8 | 4 | ||||
| -rw-r--r-- | sbin/slattach/slattach.c | 9 | ||||
| -rw-r--r-- | sbin/ttyflags/ttyflags.c | 10 |
3 files changed, 17 insertions, 6 deletions
diff --git a/sbin/slattach/slattach.8 b/sbin/slattach/slattach.8 index 460ec4aa703..bb4d2e2993c 100644 --- a/sbin/slattach/slattach.8 +++ b/sbin/slattach/slattach.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: slattach.8,v 1.14 1997/09/15 11:20:04 lukem Exp $ +.\" $NetBSD: slattach.8,v 1.15 1997/10/20 08:08:17 scottr Exp $ .\" .\" Copyright (c) 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -53,6 +53,8 @@ The following operands are supported by .Bl -tag -width Ar .It Fl h Turn on RTS/CTS flow control. By default, no flow control is done. +.It Fl H +Turn on DTR/CTS flow control. By default, no flow control is done. .It Fl m Maintain modem control signals after closing the line. Specifically, this disables HUPCL. diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index bd114608ac4..3ecf6009405 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -1,4 +1,4 @@ -/* $NetBSD: slattach.c,v 1.18 1997/09/15 11:20:06 lukem Exp $ */ +/* $NetBSD: slattach.c,v 1.19 1997/10/20 08:08:20 scottr Exp $ */ /* * Copyright (c) 1988, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)slattach.c 8.2 (Berkeley) 1/7/94"; #else -__RCSID("$NetBSD: slattach.c,v 1.18 1997/09/15 11:20:06 lukem Exp $"); +__RCSID("$NetBSD: slattach.c,v 1.19 1997/10/20 08:08:20 scottr Exp $"); #endif #endif /* not lint */ @@ -91,11 +91,14 @@ main(argc, argv) int ch; sigset_t sigset; - while ((ch = getopt(argc, argv, "hms:t:")) != -1) { + while ((ch = getopt(argc, argv, "hHms:t:")) != -1) { switch (ch) { case 'h': cflag |= CRTSCTS; break; + case 'H': + cflag |= CDTRCTS; + break; case 'm': cflag &= ~HUPCL; break; diff --git a/sbin/ttyflags/ttyflags.c b/sbin/ttyflags/ttyflags.c index 8f40889c73d..0cf06be2f18 100644 --- a/sbin/ttyflags/ttyflags.c +++ b/sbin/ttyflags/ttyflags.c @@ -1,4 +1,4 @@ -/* $NetBSD: ttyflags.c,v 1.9 1997/09/15 11:24:41 lukem Exp $ */ +/* $NetBSD: ttyflags.c,v 1.10 1997/10/20 08:08:24 scottr Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -37,7 +37,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994 Christopher G. Demetriou\n\ #endif /* not lint */ #ifndef lint -__RCSID("$NetBSD: ttyflags.c,v 1.9 1997/09/15 11:24:41 lukem Exp $"); +__RCSID("$NetBSD: ttyflags.c,v 1.10 1997/10/20 08:08:24 scottr Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -185,6 +185,12 @@ change_ttyflags(tep) (void)strcat(strflags, "|"); (void)strcat(strflags, "rtscts"); } + if (st & TTY_DTRCTS) { + flags |= TIOCFLAG_CDTRCTS; + if (sep++) + (void)strcat(strflags, "|"); + (void)strcat(strflags, "dtrcts"); + } if (st & TTY_SOFTCAR) { flags |= TIOCFLAG_SOFTCAR; if (sep++) |
