Skip to content

Commit 3bdb5ac

Browse files
33671sirhcel
authored andcommitted
fix input baudrate not cleared
1 parent c5e7433 commit 3bdb5ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/posix/termios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub(crate) fn set_stop_bits(termios: &mut Termios, stop_bits: StopBits) {
214214
)
215215
))]
216216
pub(crate) fn set_baud_rate(termios: &mut Termios, baud_rate: u32) -> Result<()> {
217-
termios.c_cflag &= !nix::libc::CBAUD;
217+
termios.c_cflag &= !(nix::libc::CBAUD | nix::libc::CIBAUD);
218218
termios.c_cflag |= nix::libc::BOTHER;
219219
termios.c_ispeed = baud_rate;
220220
termios.c_ospeed = baud_rate;

0 commit comments

Comments
 (0)