Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639058
| From | Alan Cox <gnomes@lxorguk.ukuu.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control |
| Date | 2017-05-10 21:50 +0200 |
| Message-ID | <tFFMt-4KS-1@gated-at.bofh.it> (permalink) |
| References | <tFcKu-1MB-19@gated-at.bofh.it> <tFcKu-1MB-29@gated-at.bofh.it> |
| Organization | Intel Corporation |
> + if (!(tmp_termios.c_cflag & CRTSCTS)) {
> + tmp_termios.c_cflag |= CRTSCTS;
> + ret = tty_set_termios(tty, &tmp_termios);
> + if (ret)
> + pr_warn("speakup: Failed to set hardware flow control\n");
You should check the tty c_cflag after the call rather than rely on an
error code. Strictly speaking tty_set_termios should error if no tty bits
are changed by the request but it never has on Linux. Instead check the
tty gave you the result you wanted.
Alan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch 0/1] staging: speakup: flush tty buffers and ensure hardware flow control okash.khawaja@gmail.com - 2017-05-09 14:50 +0200
[patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control okash.khawaja@gmail.com - 2017-05-09 14:50 +0200
Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-10 21:50 +0200
Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control Okash Khawaja <okash.khawaja@gmail.com> - 2017-05-11 10:40 +0200
Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-11 15:40 +0200
csiph-web