]> sigrok.org Git - libsigrok.git/blobdiff - hardware/common/serial.c
serial: get rid of overly verbose spew
[libsigrok.git] / hardware / common / serial.c
index 98b076109c0ffd2392fc1f5697c772cc67fdd108..336e78ce288b52f2cb07b5b9a7f5bb5da72297b4 100644 (file)
@@ -278,13 +278,7 @@ SR_PRIV int serial_read(struct sr_serial_dev_inst *serial, void *buf,
 #else
        /* Returns the number of bytes read, or -1 upon failure. */
        ret = read(serial->fd, buf, count);
-       if (ret < 0)
-               /*
-                * Should be sr_err(), but that would yield lots of
-                * "Resource temporarily unavailable" messages.
-                */
-               sr_spew("Read error: %s (fd %d).", strerror(errno), serial->fd);
-       else
+       if (ret >= 0)
                sr_spew("Read %d/%d bytes (fd %d).", ret, count, serial->fd);
 #endif
 
@@ -834,7 +828,7 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
                if (len > 0) {
                        ibuf += len;
                } else if (len == 0) {
-                       sr_spew("Error: Only read 0 bytes.");
+                       /* No logging, already done in serial_read(). */
                } else {
                        /* Error reading byte, but continuing anyway. */
                }