mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
icarus add errno to rerr and werr
This commit is contained in:
parent
4aaeb510c8
commit
0df870b38d
@ -433,8 +433,8 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct
|
||||
err = usb_read_timeout(icarus, (char *)buf, read_amount, &amt, ICARUS_WAIT_TIMEOUT, C_GETRESULTS);
|
||||
cgtime(&read_finish);
|
||||
if (err < 0 && err != LIBUSB_ERROR_TIMEOUT) {
|
||||
applog(LOG_ERR, "%s%i: Comms error (rerr=%d amt=%d)",
|
||||
icarus->drv->name, icarus->device_id, err, amt);
|
||||
applog(LOG_ERR, "%s%i: Comms error (rerr=%d amt=%d, eno=%d)",
|
||||
icarus->drv->name, icarus->device_id, err, amt, errno);
|
||||
dev_error(icarus, REASON_DEV_COMMS_ERROR);
|
||||
return ICA_NONCE_ERROR;
|
||||
}
|
||||
@ -894,8 +894,8 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
|
||||
|
||||
err = usb_write(icarus, (char *)ob_bin, sizeof(ob_bin), &amount, C_SENDWORK);
|
||||
if (err < 0 || amount != sizeof(ob_bin)) {
|
||||
applog(LOG_ERR, "%s%i: Comms error (werr=%d amt=%d)",
|
||||
icarus->drv->name, icarus->device_id, err, amount);
|
||||
applog(LOG_ERR, "%s%i: Comms error (werr=%d amt=%d eno=%d)",
|
||||
icarus->drv->name, icarus->device_id, err, amount, errno);
|
||||
dev_error(icarus, REASON_DEV_COMMS_ERROR);
|
||||
icarus_initialise(icarus, info->baud);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user