From: Bert Vermeulen Date: Thu, 20 Dec 2012 09:41:48 +0000 (+0100) Subject: serial: get rid of overly verbose spew X-Git-Tag: dsupstream~425 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=49aaa0bc68c1bf77cd81989c40e471fe7bd161ec;p=libsigrok.git serial: get rid of overly verbose spew It just made spew-level logging unusable; the way sigrok async comms work guarantees most of it was a false error. --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index cfdf9156..336e78ce 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -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