Commit 12554af1620efd9671f24c0be7f465ed344ac2a9

Con Kolivas 2014-02-13T23:50:33

Add blacklisting as an option to the USB menu.

diff --git a/cgminer.c b/cgminer.c
index 4fe8c6b..813b991 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5186,7 +5186,7 @@ retry:
 	wlogprint("[U]nplug to allow hotplug restart\n");
 	wlogprint("[R]eset device USB\n");
 	wlogprint("[L]ist all known devices\n");
-	//wlogprint("[B]lacklist device from cgminer\n");
+	wlogprint("[B]lacklist current device from cgminer\n");
 	wlogprint("Select an option or any other key to return\n");
 	logwin_update();
 	input = getch();
@@ -5274,6 +5274,19 @@ retry:
 		}
 		usb_reset(cgpu);
 		goto retry;
+	} else if (!strncasecmp(&input, "b", 1)) {
+		selected = curses_int("Select device number");
+		if (selected < 0 || selected >= mt)  {
+			wlogprint("Invalid selection\n");
+			goto retry;
+		}
+		cgpu = mining_thr[selected]->cgpu;
+		if (cgpu->usbinfo.nodev) {
+			wlogprint("Device already removed, unable to blacklist!\n");
+			goto retry;
+		}
+		blacklist_cgpu(cgpu);
+		goto retry;
 	} else if (!strncasecmp(&input, "l", 1)) {
 		usb_all(0);
 		goto retry;