aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-05-13 08:15:58 +0100
committerRon Yorston <rmy@pobox.com>2018-05-13 08:15:58 +0100
commit3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d (patch)
treea527d0db15f34a137fc11df5538c7f2f7c6d72de /libbb
parent6f7d1af269eed4b42daeb9c6dfd2ba62f9cd47e4 (diff)
parentd80eecb86812c1fbda652f9b995060c26ba0b155 (diff)
downloadbusybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.tar.gz
busybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.tar.bz2
busybox-w32-3ce461fdf3b7adfd44ea058fa0c5ca6d91a5bc5d.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Config.src12
-rw-r--r--libbb/xfuncs.c13
2 files changed, 21 insertions, 4 deletions
diff --git a/libbb/Config.src b/libbb/Config.src
index fdf8bbb28..16e16480b 100644
--- a/libbb/Config.src
+++ b/libbb/Config.src
@@ -76,6 +76,18 @@ config FEATURE_ETC_NETWORKS
76 a rarely used feature which allows you to use names 76 a rarely used feature which allows you to use names
77 instead of IP/mask pairs in route command. 77 instead of IP/mask pairs in route command.
78 78
79config FEATURE_ETC_SERVICES
80 bool "Consult /etc/services even for well-known ports"
81 default n
82 help
83 Look up e.g. "telnet" and "http" in /etc/services file
84 instead of assuming ports 23 and 80.
85 This is almost never necessary (everybody uses standard ports),
86 and it makes sense to avoid reading this file.
87 If you disable this option, in the cases where port is explicitly
88 specified as a service name (e.g. "telnet HOST PORTNAME"),
89 it will still be looked up in /etc/services.
90
79config FEATURE_EDITING 91config FEATURE_EDITING
80 bool "Command line editing" 92 bool "Command line editing"
81 default y 93 default y
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 6fa21ad00..57bda6204 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -333,7 +333,6 @@ int FAST_FUNC get_termios_and_make_raw(int fd, struct termios *newterm, struct t
333 newterm->c_cc[VMIN] = 1; 333 newterm->c_cc[VMIN] = 1;
334 /* no timeout (reads block forever) */ 334 /* no timeout (reads block forever) */
335 newterm->c_cc[VTIME] = 0; 335 newterm->c_cc[VTIME] = 0;
336 if (flags & TERMIOS_RAW_CRNL) {
337/* IXON, IXOFF, and IXANY: 336/* IXON, IXOFF, and IXANY:
338 * IXOFF=1: sw flow control is enabled on input queue: 337 * IXOFF=1: sw flow control is enabled on input queue:
339 * tty transmits a STOP char when input queue is close to full 338 * tty transmits a STOP char when input queue is close to full
@@ -343,9 +342,12 @@ int FAST_FUNC get_termios_and_make_raw(int fd, struct termios *newterm, struct t
343 * and resume sending if START is received, or if any char 342 * and resume sending if START is received, or if any char
344 * is received and IXANY=1. 343 * is received and IXANY=1.
345 */ 344 */
345 if (flags & TERMIOS_RAW_CRNL_INPUT) {
346 /* IXON=0: XON/XOFF chars are treated as normal chars (why we do this?) */ 346 /* IXON=0: XON/XOFF chars are treated as normal chars (why we do this?) */
347 /* dont convert CR to NL on input */ 347 /* dont convert CR to NL on input */
348 newterm->c_iflag &= ~(IXON | ICRNL); 348 newterm->c_iflag &= ~(IXON | ICRNL);
349 }
350 if (flags & TERMIOS_RAW_CRNL_OUTPUT) {
349 /* dont convert NL to CR+NL on output */ 351 /* dont convert NL to CR+NL on output */
350 newterm->c_oflag &= ~(ONLCR); 352 newterm->c_oflag &= ~(ONLCR);
351 /* Maybe clear more c_oflag bits? Usually, only OPOST and ONLCR are set. 353 /* Maybe clear more c_oflag bits? Usually, only OPOST and ONLCR are set.
@@ -366,9 +368,12 @@ int FAST_FUNC get_termios_and_make_raw(int fd, struct termios *newterm, struct t
366#ifndef IXANY 368#ifndef IXANY
367# define IXANY 0 369# define IXANY 0
368#endif 370#endif
369 /* IXOFF=0: disable sending XON/XOFF if input buf is full */ 371 /* IXOFF=0: disable sending XON/XOFF if input buf is full
370 /* IXON=0: input XON/XOFF chars are not special */ 372 * IXON=0: input XON/XOFF chars are not special
371 /* dont convert anything on input */ 373 * BRKINT=0: dont send SIGINT on break
374 * IMAXBEL=0: dont echo BEL on input line too long
375 * INLCR,ICRNL,IUCLC: dont convert anything on input
376 */
372 newterm->c_iflag &= ~(IXOFF|IXON|IXANY|BRKINT|INLCR|ICRNL|IUCLC|IMAXBEL); 377 newterm->c_iflag &= ~(IXOFF|IXON|IXANY|BRKINT|INLCR|ICRNL|IUCLC|IMAXBEL);
373 } 378 }
374 return r; 379 return r;