From: Uwe Hermann Date: Sat, 6 Oct 2018 15:14:24 +0000 (+0200) Subject: zeroplus-logic-cube: Only emit log message upon unexpected number of bytes. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=11cf492183f499605ba107e35f46cfd128585cb5;p=libsigrok.git zeroplus-logic-cube: Only emit log message upon unexpected number of bytes. --- diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index 4ebe152f..7a4041a1 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -547,8 +547,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) unsigned int buf_offset; res = analyzer_read_data(usb->devhdl, buf, PACKET_SIZE); - sr_info("Tried to read %d bytes, actually read %d bytes.", - PACKET_SIZE, res); + if (res != PACKET_SIZE) + sr_warn("Tried to read %d bytes, actually read %d.", + PACKET_SIZE, res); if (discard >= PACKET_SIZE / 4) { discard -= PACKET_SIZE / 4;