]> sigrok.org Git - libsigrok.git/commitdiff
serial: get rid of overly verbose spew
authorBert Vermeulen <redacted>
Thu, 20 Dec 2012 09:41:48 +0000 (10:41 +0100)
committerBert Vermeulen <redacted>
Mon, 24 Dec 2012 10:22:01 +0000 (11:22 +0100)
It just made spew-level logging unusable; the way sigrok async comms work
guarantees most of it was a false error.

hardware/common/serial.c

index cfdf9156a56556467d3755ce6f13cd3d7adfe02f..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