Commit Graph

11 Commits

Author SHA1 Message Date
Harald Welte 1514f34dcf serial.c: file descriptor '0' is a valid value
if stdin/stdout/stderr are all closed by our environment, it may very
well be that opening a serial port returns fd == 0.

Change-Id: Ifd9670260883a35da0629369e0d49e467d5b4d72
2016-12-24 17:59:36 +01:00
Harald Welte d2510459a8 serial.c: Fix fd leak in case of fcntl() error paths
Change-Id: I14f934957e1086b803f3a7b9b5e6d602380f0be2
Fixes: Coverity CID 158987
2016-12-24 17:58:13 +01:00
Harald Welte c68ce3b9fe serial.c: Some ports don't support TIOCMBIS for RTS/CTS control
So let's ignore the error we might get from this opreration.

Change-Id: I69dad90403355b6512c3bf4c7fd10dd1dd985f01
2016-12-23 22:59:27 +01:00
Harald Welte 1db37820aa serial: Open devie in non-blocking mode and then switch to blocking
There are some serial ports that apparently block during the open in
some circumstances.  We don't want that.  We want to either open it
immediately, or fail fast.

Change-Id: I626b138574bc50f4f4b09c4d609f3623ff512dff
2016-12-23 22:50:10 +01:00
Katerina Barone-Adesi c28c6a02d2 misc: Doxygen tweaks: fixed some typos and minor errors
Doxygen generates quite a lot of warnings on libosmocore. Some of them
are obvious typos - this patch aims to fix such low-hanging fruit.
2013-02-15 13:27:59 +01:00
Harald Welte 22be129e1e serial: don't set O_NDELAY, as it is more or less O_NONBLOCK
Applications like osmocon will set O_NONBLOCK themselves or have it done
indirectly by registering it with libosmocore/select.c code.
2012-08-03 10:48:22 +02:00
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Sylvain Munaut 31d3de943c core/serial: Fix warning when on platform other than linux
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20 08:55:11 +01:00
Sylvain Munaut e40549a0ae core/serial: Fix typo
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-28 10:55:22 +02:00
Sylvain Munaut 9631184399 core/serial: support custom baud rates on OS X
Thanks to Richard James <xyzzy@mm.st> for the patch

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-28 09:11:09 +02:00
Sylvain Munaut fe28dedd4c core/serial: Add utilities to deal with serial ports
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02 22:21:09 +02:00