|
|
@ -139,12 +139,21 @@ 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; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (autoscan || !found) |
|
|
|
bitforce_detect_auto(); |
|
|
|
bitforce_detect_auto(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|