]> rtime.felk.cvut.cz Git - sojka/sterm.git/commitdiff
Disable flow control
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 27 Jan 2015 09:29:55 +0000 (10:29 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 27 Jan 2015 09:29:55 +0000 (10:29 +0100)
RTS/CTS lines may be used for something else than flow control so disable
it. If it turns out that we need it for some hardware, we will add an
command line option to enable it.

sterm.c

diff --git a/sterm.c b/sterm.c
index 209f83c92df4d42ecd2a13d8c3c58d3e4a2ac73a..407f6c26830ea4a8855546760d3baaa5a2cd954a 100644 (file)
--- a/sterm.c
+++ b/sterm.c
@@ -242,6 +242,8 @@ int main(int argc, char *argv[])
                        CHECK(ioctl(fd, TIOCMSET, &status));
                }
 
+               tio.c_cflag &= ~(CRTSCTS|IXON|IXOFF); /* Disable flow control */
+
                CHECK(tcsetattr(fd, TCSANOW, &tio));
        } else if (speed || dtr || rts) {
                fprintf(stderr, "Cannot set speed, DTR or RTS on non-terminal %s\n", dev);