1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Merge pull request #173 from luke-jr/bugfix_noauto

"-S noauto" option, to inhibit FPGA autoscanning
This commit is contained in:
Con Kolivas 2012-04-21 22:47:46 -07:00
commit 40e6dd7cc5
3 changed files with 11 additions and 5 deletions

11
README
View File

@ -205,13 +205,14 @@ FPGA mining boards(BitForce, Icarus) only options:
--scan-serial|-S <arg> Serial port to probe for FPGA mining device --scan-serial|-S <arg> Serial port to probe for FPGA mining device
By default, cgminer will scan for autodetected FPGAs unless at least one By default, cgminer will scan for autodetected FPGAs unless at least one
-S is specified. If you specify -S and still want cgminer to scan, you -S is specified for that driver. If you specify -S and still want cgminer
must also use "-S auto". Note that presently, autodetection only works to scan, you must also use "-S auto". If you want to prevent cgminer from
on Linux, and might only detect one device depending on the version of scanning without specifying a device, you can use "-S noauto". Note that
udev being used. presently, autodetection only works on Linux, and might only detect one
device depending on the version of udev being used.
On linux <arg> is usually of the format /dev/ttyUSBn On linux <arg> is usually of the format /dev/ttyUSBn
On windows <arg> is usually of the format COMn On windows <arg> is usually of the format \\.\COMn
(where n = the correct device number for the FPGA device) (where n = the correct device number for the FPGA device)

View File

@ -216,6 +216,9 @@ static void bitforce_detect()
s += 9; s += 9;
if (!strcmp(s, "auto")) if (!strcmp(s, "auto"))
autoscan = true; autoscan = true;
else
if (!strcmp(s, "noauto"))
found = true;
else if (bitforce_detect_one(s)) { else if (bitforce_detect_one(s)) {
string_elist_del(iter); string_elist_del(iter);
found = true; found = true;

View File

@ -246,6 +246,8 @@ static void icarus_detect()
s = iter->string; s = iter->string;
if (!strncmp("icarus:", iter->string, 7)) if (!strncmp("icarus:", iter->string, 7))
s += 7; s += 7;
if (!strcmp(s, "auto") || !strcmp(s, "noauto"))
continue;
if (icarus_detect_one(s)) if (icarus_detect_one(s))
string_elist_del(iter); string_elist_del(iter);
} }