Trace Serialport

This commit is contained in:
Christophe De Wagter
2013-08-21 17:45:36 +02:00
parent 67c4a9f9fb
commit 65676964cf
+2 -2
View File
@@ -28,7 +28,7 @@ void serial_port_flush(struct FmsSerialPort* me) {
* flush any input that might be on the port so we start fresh. * flush any input that might be on the port so we start fresh.
*/ */
if (tcflush(me->fd, TCIFLUSH)) { if (tcflush(me->fd, TCIFLUSH)) {
TRACE(TRACE_ERROR,"%s, set term attr failed: %s (%d)\n", device, strerror(errno), errno); TRACE(TRACE_ERROR,"%s, set term attr failed: %s (%d)\n", "", strerror(errno), errno);
fprintf(stderr, "flush (%d) failed: %s (%d)\n", me->fd, strerror(errno), errno); fprintf(stderr, "flush (%d) failed: %s (%d)\n", me->fd, strerror(errno), errno);
} }
} }
@@ -38,7 +38,7 @@ void serial_port_flush_output(struct FmsSerialPort* me) {
* flush any input that might be on the port so we start fresh. * flush any input that might be on the port so we start fresh.
*/ */
if (tcflush(me->fd, TCOFLUSH)) { if (tcflush(me->fd, TCOFLUSH)) {
TRACE(TRACE_ERROR,"%s, set term attr failed: %s (%d)\n", device, strerror(errno), errno); TRACE(TRACE_ERROR,"%s, set term attr failed: %s (%d)\n", "", strerror(errno), errno);
fprintf(stderr, "flush (%d) failed: %s (%d)\n", me->fd, strerror(errno), errno); fprintf(stderr, "flush (%d) failed: %s (%d)\n", me->fd, strerror(errno), errno);
} }
} }