serial: lower severity of failed stream detect message
Reduce the message's log level from ERR to INFO when the serial stream detect routine cannot find a valid packet. Although an error code gets returned, the condition need not be fatal (can be the result of trying several peers before success or finally giving up). Let callers decide on the severity of failure to detect a specific device's presence, and provide more context in their message which is more helpful to users. Interested readers still get the message at slightly raised log levels. This avoids confusing user perceivable situations like these: $ sigrok-cli --scan sr: serial: Didn't find a valid packet (read 0 bytes). sr: serial: Didn't find a valid packet (read 0 bytes). The following devices were found: demo - Demo device with 13 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3 A4
This commit is contained in:
parent
7dd1dd9f7d
commit
0c52026459
|
@ -867,7 +867,7 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
|
|||
|
||||
*buflen = ibuf;
|
||||
|
||||
sr_err("Didn't find a valid packet (read %zu bytes).", *buflen);
|
||||
sr_info("Didn't find a valid packet (read %zu bytes).", *buflen);
|
||||
|
||||
return SR_ERR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue