coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] stty: support "flusho" local setting


From: Pádraig Brady
Subject: [PATCH] stty: support "flusho" local setting
Date: Wed, 6 Jan 2016 16:09:01 +0000

This is used to discard terminal output on FreeBSD based systems.

* src/stty.c (mode_info): Add FLUSHO where supported.
(usage): Document for "local" and "combination" settings.
* doc/coreutils.texi (local stty settings): Document,
mentioning that this option is supported but ignored on GNU/Linux.
---
 doc/coreutils.texi |  7 +++++++
 src/stty.c         | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 1fd99d0..2538062 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -14187,6 +14187,13 @@ each character over high latency links.  See also
 @uref{ftp://ftp.rfc-editor.org/in-notes/rfc1116.txt, Internet RFC 1116}.
 Non-POSIX@.
 May be negated.
+
+@item flusho
+@opindex flusho
+Discard output.
+Note this setting is currently ignored on GNU/Linux systems.
+Non-POSIX@.
+May be negated.
 @end table
 
 
diff --git a/src/stty.c b/src/stty.c
index 6a365ad..30053cc 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -343,6 +343,9 @@ static struct mode_info const mode_info[] =
   {"echoke", local, SANE_SET | REV, ECHOKE, 0},
   {"crtkill", local, REV | OMIT, ECHOKE, 0},
 #endif
+#ifdef FLUSHO
+  {"flusho", local, SANE_UNSET | REV, FLUSHO, 0},
+#endif
 #if defined TIOCEXT
   {"extproc", local, SANE_UNSET | REV | NO_SETATTR, EXTPROC, 0},
 #elif defined EXTPROC
@@ -835,6 +838,11 @@ Local settings:\n\
  * [-]extproc    enable \"LINEMODE\"; useful with high latency links\n\
 "), stdout);
 #endif
+#if defined FLUSHO
+      fputs (_("\
+ * [-]flusho     discard output\n\
+"), stdout);
+#endif
       printf (_("\
    [-]icanon     enable special characters: %s\n\
    [-]iexten     enable non-POSIX special characters\n\
@@ -1054,6 +1062,9 @@ Combination settings:\n\
 #ifdef EXTPROC
    " -extproc"
 #endif
+#ifdef FLUSHO
+   " -flusho"
+#endif
 );
       fputs (_("\
 \n\
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]