Jonathan A. Kollasch has posted comments on this change. ( https://review.coreboot.org/23693 )
Change subject: improve termios settings on some OSes ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/23693/1/serial.c File serial.c:
https://review.coreboot.org/#/c/23693/1/serial.c@216 PS1, Line 216: wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS); : wanted.c_cflag |= (CS8 | CLOCAL | CREAD); : 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; It might be wise to start with cfmakeraw(3). Although it does not appear to be standardized by Open Group, I see cfmakeraw(3) available on my GNU/Linux installations.
https://nxr.netbsd.org/xref/src/lib/libc/termios/cfmakeraw.c#51
But, if you've covered all the bits that NetBSD's cfmakeraw(3) does, I have no objection.