mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Merge pull request #115 from luke-jr/bitforce_disable_autoscan
bitforce: Disable automatic scanning when at least one device is specified manually
This commit is contained in:
commit
158c09107c
11
bitforce.c
11
bitforce.c
@ -139,13 +139,22 @@ static void bitforce_detect_auto()
|
|||||||
static void bitforce_detect()
|
static void bitforce_detect()
|
||||||
{
|
{
|
||||||
struct string_elist *iter, *tmp;
|
struct string_elist *iter, *tmp;
|
||||||
|
bool found = false;
|
||||||
|
bool autoscan = false;
|
||||||
|
|
||||||
list_for_each_entry_safe(iter, tmp, &scan_devices, list) {
|
list_for_each_entry_safe(iter, tmp, &scan_devices, list) {
|
||||||
|
if (!strcmp(iter->string, "auto"))
|
||||||
|
autoscan = true;
|
||||||
|
else
|
||||||
if (bitforce_detect_one(iter->string))
|
if (bitforce_detect_one(iter->string))
|
||||||
|
{
|
||||||
string_elist_del(iter);
|
string_elist_del(iter);
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitforce_detect_auto();
|
if (autoscan || !found)
|
||||||
|
bitforce_detect_auto();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void get_bitforce_statline_before(char *buf, struct cgpu_info *bitforce)
|
static void get_bitforce_statline_before(char *buf, struct cgpu_info *bitforce)
|
||||||
|
Loading…
Reference in New Issue
Block a user