[flashrom] [patch] improve termios settings on some OSes

Jonathan A. Kollasch jakllsch at kollasch.net
Tue Mar 8 20:11:04 CET 2011


Fix termios settings on, at least, NetBSD.

Signed-off-by: Jonathan Kollasch <jakllsch at kollasch.net>
-------------- next part --------------
Index: serial.c
===================================================================
--- serial.c	(revision 1280)
+++ serial.c	(working copy)
@@ -162,8 +162,10 @@
 	}
 	options.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
 	options.c_cflag |= (CS8 | CLOCAL | CREAD);
-	options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
+	options.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | ISIG | IEXTEN);
+	options.c_lflag &= ~(ECHOCTL | ECHOKE);
 	options.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
+	options.c_iflag &= ~(PARMRK);
 	options.c_oflag &= ~OPOST;
 	tcsetattr(fd, TCSANOW, &options);
 	return fd;


More information about the flashrom mailing list