Commit 1a19729aaab4b36aa31317c541e8d2de62d07cb9

Con Kolivas 2013-03-21T14:56:44

Allow cgminer to start if usb hotplug is enabled but no devices yet exist.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index a8e0116..9ed39f6 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7342,8 +7342,15 @@ int main(int argc, char *argv[])
 			enable_device(devices[i]);
 	}
 
+#ifdef USE_USBUTILS
+	if (!total_devices) {
+		applog(LOG_WARNING, "No devices detected!");
+		applog(LOG_WARNING, "Waiting for USB hotplug devices or press q to quit");
+	}
+#else
 	if (!total_devices)
 		quit(1, "All devices disabled, cannot mine!");
+#endif
 
 	start_devices = total_devices;