From 0f74ba059e6adb08256877a46b05b033a3df9cb8 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sun, 22 Apr 2012 00:57:59 -0400 Subject: [PATCH] Implement and document "-S noauto" to inhibit autoscanning without specifying a serial device --- README | 9 +++++---- driver-bitforce.c | 3 +++ driver-icarus.c | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README b/README index 63448466..680415cf 100644 --- a/README +++ b/README @@ -205,10 +205,11 @@ FPGA mining boards(BitForce, Icarus) only options: --scan-serial|-S Serial port to probe for FPGA mining device 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 - must also use "-S auto". Note that presently, autodetection only works - on Linux, and might only detect one device depending on the version of - udev being used. + -S is specified for that driver. If you specify -S and still want cgminer + to scan, you must also use "-S auto". If you want to prevent cgminer from + scanning without specifying a device, you can use "-S noauto". Note that + presently, autodetection only works on Linux, and might only detect one + device depending on the version of udev being used. On linux is usually of the format /dev/ttyUSBn On windows is usually of the format COMn diff --git a/driver-bitforce.c b/driver-bitforce.c index f93eb871..d7f7d8bb 100644 --- a/driver-bitforce.c +++ b/driver-bitforce.c @@ -216,6 +216,9 @@ static void bitforce_detect() s += 9; if (!strcmp(s, "auto")) autoscan = true; + else + if (!strcmp(s, "noauto")) + found = true; else if (bitforce_detect_one(s)) { string_elist_del(iter); found = true; diff --git a/driver-icarus.c b/driver-icarus.c index 46c2c54e..87c5fbc1 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -246,7 +246,7 @@ static void icarus_detect() s = iter->string; if (!strncmp("icarus:", iter->string, 7)) s += 7; - if (!strcmp(s, "auto")) + if (!strcmp(s, "auto") || !strcmp(s, "noauto")) continue; if (icarus_detect_one(s)) string_elist_del(iter);