Nico Huber would like Jonathan A. Kollasch to review this change.
improve termios settings on some OSes
Fix termios settings on, at least, NetBSD.
Change-Id: I5da80f541e02c3b8e676e47a45388bfb115b4762
Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>
---
M serial.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/93/23693/1
diff --git a/serial.c b/serial.c
index aa75708..f0f6f5e 100644
--- a/serial.c
+++ b/serial.c
@@ -215,8 +215,10 @@
}
wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
wanted.c_cflag |= (CS8 | CLOCAL | CREAD);
- wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG | IEXTEN);
+ wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | ISIG | IEXTEN);
+ wanted.c_lflag &= ~(ECHOCTL | ECHOKE);
wanted.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
+ wanted.c_iflag &= ~(PARMRK);
wanted.c_oflag &= ~OPOST;
if (tcsetattr(fd, TCSANOW, &wanted) != 0) {
msg_perr_strerror("Could not change serial port configuration: ");
To view, visit change 23693. To unsubscribe, or for help writing mail filters, visit settings.