On Tue, 19 Nov 2013 20:35:57 +0100 Stefan Reinauer stefan.reinauer@coreboot.org wrote:
Index: serial.c
--- serial.c (revision 1763) +++ serial.c (working copy) @@ -181,7 +181,10 @@ msg_pdbg("Baud rate is %ld.\n", dcb.BaudRate); #else struct termios wanted, observed;
- fcntl(fd, F_SETFL, 0);
- if (fcntl(fd, F_SETFL, 0) != 0) {
msg_perr_strerror("Could not set serial port mode: ");
return 1;
- } if (tcgetattr(fd, &observed) != 0) { msg_perr_strerror("Could not fetch original serial port configuration: "); return 1;
Why do we clear all file descriptor flags anyway? The code is from Urja, hence the CC.