1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 15:27:53 +00:00

Merge pull request #152 from luke-jr/specify_driver

Allow specifying a specific driver for --scan-serial
This commit is contained in:
Con Kolivas 2012-03-28 04:21:41 -07:00
commit 36aadd6609
2 changed files with 11 additions and 3 deletions

View File

@ -203,13 +203,17 @@ static void bitforce_detect_auto()
static void bitforce_detect()
{
struct string_elist *iter, *tmp;
const char*s;
bool found = false;
bool autoscan = false;
list_for_each_entry_safe(iter, tmp, &scan_devices, list) {
if (!strcmp(iter->string, "auto"))
s = iter->string;
if (!strncmp("bitforce:", iter->string, 9))
s += 9;
if (!strcmp(s, "auto"))
autoscan = true;
else if (bitforce_detect_one(iter->string)) {
else if (bitforce_detect_one(s)) {
string_elist_del(iter);
found = true;
}

View File

@ -205,9 +205,13 @@ static bool icarus_detect_one(const char *devpath)
static void icarus_detect()
{
struct string_elist *iter, *tmp;
const char*s;
list_for_each_entry_safe(iter, tmp, &scan_devices, list) {
if (icarus_detect_one(iter->string))
s = iter->string;
if (!strncmp("icarus:", iter->string, 7))
s += 7;
if (icarus_detect_one(s))
string_elist_del(iter);
}
}