Commit 40b8eed7aadc32e3408ce32cff5fee5143b3f62f

Con Kolivas 2014-02-13T22:46:37

Add warning for attempting to unplug a usb device that is already removed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cgminer.c b/cgminer.c
index b5c340b..dfc3b5e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5252,6 +5252,10 @@ retry:
 			goto retry;
 		}
 		cgpu = mining_thr[selected]->cgpu;
+		if (cgpu->usbinfo.nodev) {
+			wlogprint("Device already removed, unable to unplug!\n");
+			goto retry;
+		}
 		usb_nodev(cgpu);
 		goto retry;
 	} else