I have generally trouble to understand why everybody modifies an
existing terminal config instead of writing his own. Are there
too many implementation specific pitfalls?
1 comment:
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
Given that flashrom is supposed to work on much more than Linux/BSD,
I'd rather not try to use non-standard functions.
But, if you've covered all the bits that NetBSD's cfmakeraw(3)
does, I have no objection.
It's actually your patch ;) I merely ported it from patchwork [1].
No idea if anybody or why nobody considered it earlier.
I have trouble understanding every detail in the man pages and
have no way for regression testing (lack of any serial based
programmer). That's also why a related commit, 22334, didn't make
it into the 1.0 release.
If you can test this on at least two different OSs (e.g. Linux,
BSD) that would be very nice.
[1] https://patchwork.coreboot.org/patch/2757/
To view, visit change 23693. To unsubscribe, or for help writing mail filters, visit settings.