mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 14:04:25 +00:00
bflsc - allow a 0 in DEVICES IN CHAIN
This commit is contained in:
parent
ab5b2229f8
commit
1f166d99b0
@ -645,11 +645,14 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
|
|||||||
else if (strstr(firstname, BFLSC_DI_XLINKPRESENT))
|
else if (strstr(firstname, BFLSC_DI_XLINKPRESENT))
|
||||||
sc_dev.xlink_present = strdup(fields[0]);
|
sc_dev.xlink_present = strdup(fields[0]);
|
||||||
else if (strstr(firstname, BFLSC_DI_DEVICESINCHAIN)) {
|
else if (strstr(firstname, BFLSC_DI_DEVICESINCHAIN)) {
|
||||||
sc_info->sc_count = atoi(fields[0]);
|
if (fields[0][0] == '0')
|
||||||
|
sc_info->sc_count = 1;
|
||||||
|
else
|
||||||
|
sc_info->sc_count = atoi(fields[0]);
|
||||||
if (sc_info->sc_count < 1 || sc_info->sc_count > 30) {
|
if (sc_info->sc_count < 1 || sc_info->sc_count > 30) {
|
||||||
tmp = str_text(items[i]);
|
tmp = str_text(items[i]);
|
||||||
applogsiz(LOG_WARNING, BFLSC_APPLOGSIZ,
|
applogsiz(LOG_WARNING, BFLSC_APPLOGSIZ,
|
||||||
"%s detect (%s) invalid s-link count: '%s'",
|
"%s detect (%s) invalid x-link count: '%s'",
|
||||||
bflsc->drv->dname, bflsc->device_path, tmp);
|
bflsc->drv->dname, bflsc->device_path, tmp);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
goto mata;
|
goto mata;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user