]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stty: add support for DTR/DSR hardware control flow
authorOndřej Vašík <ovasik@redhat.com>
Tue, 5 Feb 2013 14:00:47 +0000 (15:00 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 5 Feb 2013 16:05:54 +0000 (16:05 +0000)
Originally requested in Red Hat bugzilla #445213.

* src/stty.c (mode_info): Add support for DTR/DSR hardware flow control,
if available.
* doc/coreutils.texi: Document it.
* tests/misc/stty.sh: Add it to the list of serial options to avoid.
* NEWS: Mention the improvement.

NEWS
doc/coreutils.texi
src/stty.c
tests/misc/stty.sh

diff --git a/NEWS b/NEWS
index f3af75c3e4c10ee50d2efba7d01853deb4383341..51b7a82f06f88c4582f94c83c8581e08247e175f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,7 @@ GNU coreutils NEWS                                    -*- outline -*-
   stat and tail now know about CEPH.  stat -f --format=%T now reports the file
   system type, and tail -f uses polling for files on CEPH file systems.
 
+  stty now supports configuring DTR/DSR hardware flow control where available.
 
 ** Build-related
 
index e248af0e276c6a12f94cb96b732478f5be863f8c..faed80d61f38c2066966e343c38bf8c1455c9109 100644 (file)
@@ -13635,6 +13635,13 @@ Disable modem control signals.  May be negated.
 @cindex flow control, hardware
 @cindex RTS/CTS flow control
 Enable RTS/CTS flow control.  Non-POSIX@.  May be negated.
+
+@item cdtrdsr
+@opindex cdtrdsr
+@cindex hardware flow control
+@cindex flow control, hardware
+@cindex DTR/DSR flow control
+Enable DTR/DSR flow control. Non-POSIX@.  May be negated.
 @end table
 
 
index fe0f22f8fc6f87811abada53b95168b855b4a7c6..ee891a593354fde0494fb2a20728cce79dc74f12 100644 (file)
@@ -217,6 +217,9 @@ static struct mode_info const mode_info[] =
 #ifdef CRTSCTS
   {"crtscts", control, REV, CRTSCTS, 0},
 #endif
+#ifdef CDTRDSR
+  {"cdtrdsr", control, REV, CDTRDSR, 0},
+#endif
 
   {"ignbrk", input, SANE_UNSET | REV, IGNBRK, 0},
   {"brkint", input, SANE_SET | REV, BRKINT, 0},
@@ -581,6 +584,7 @@ Control settings:\n\
    [-]clocal     disable modem control signals\n\
    [-]cread      allow input to be received\n\
  * [-]crtscts    enable RTS/CTS handshaking\n\
+ * [-]cdtrdsr    enable DTR/DSR handshaking\n\
    csN           set character size to N bits, N in [5..8]\n\
 "), stdout);
       fputs (_("\
index 0657a747232260a34e0ede064dbd08c3ee999cbd..2f9b9a3b8d588bb139039042a9d2df1146c0b700 100755 (executable)
@@ -52,7 +52,7 @@ for opt in $options; do
   # other serial control settings give the same error. So skip them.
   # Also on ppc*|sparc* glibc platforms 'icanon' gives the same error.
   # See: http://debbugs.gnu.org/7228#14
-  case $opt in parenb|parodd|cstopb|crtscts|icanon) continue;; esac
+  case $opt in parenb|parodd|cstopb|crtscts|cdtrdsr|icanon) continue;; esac
 
   stty $opt || fail=1