X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fagilent-dmm%2Fapi.c;h=084f9b4d89171699c3f87cbd8d3785fb43e8a796;hb=6fad08e6abfa4e5ee708f584e530c6b611a65cdb;hp=e4240e623cdacbb0d76069e531a7bffd30963e66;hpb=aed4ad0beaf64062752039a13f9a95326aa1df87;p=libsigrok.git diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index e4240e62..084f9b4d 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -116,9 +116,8 @@ static GSList *scan(GSList *options) return NULL; serial_flush(serial); - if (serial_write_blocking(serial, "*IDN?\r\n", 7) == -1) { - sr_err("Unable to send identification string: %s.", - strerror(errno)); + if (serial_write_blocking(serial, "*IDN?\r\n", 7, SERIAL_WRITE_TIMEOUT_MS) < 7) { + sr_err("Unable to send identification string."); return NULL; }