RTU: don't abort if line control settings can't be set.
While it's definitely a cause for concern if the line can't be set as expected, there are many useful situations where the line cannot be configured, but doesn't need to be. Aborting for those cases prevents the use of virtual serial ports for instance.
Signed-off-by: Karl Palsson [email protected]
This fixes: https://github.com/stephane/libmodbus/issues/234 allowing not just the serial to network forwarding from that issue, but also allows serial line snooping via:
socat -d -d -lu -x PTY,link=/tmp/serial,raw /dev/ttyUSB1,raw
Wouldn't it be better to detect such use cases by a stat call on the opened file and then by-pass the termios stuff when a fifo or socket is found?
That does sound better, but only if it can be detected well enough.