Commit 20c3fafe85f017dcf25af7c118a8e6fddb9dcfa3

Con Kolivas 2014-02-13T22:42:59

Add USB Unplug option to USB management device management menu.

diff --git a/cgminer.c b/cgminer.c
index 72ea982..b5c340b 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5183,7 +5183,7 @@ retry:
 	wlogprint("[S]ummary of device information\n");
 	wlogprint("[E]nable device\n");
 	wlogprint("[D]isable device\n");
-	//wlogprint("[U]nplug to allow hotplug restart\n");
+	wlogprint("[U]nplug to allow hotplug restart\n");
 	//wlogprint("[R]elease device from cgminer\n");
 	wlogprint("Select an option or any other key to return\n");
 	logwin_update();
@@ -5245,6 +5245,15 @@ retry:
 		cgpu = mining_thr[selected]->cgpu;
 		cgpu->deven = DEV_DISABLED;
 		goto retry;
+	} else if (!strncasecmp(&input, "u", 1)) {
+		selected = curses_int("Select device number");
+		if (selected < 0 || selected >= mt)  {
+			wlogprint("Invalid selection\n");
+			goto retry;
+		}
+		cgpu = mining_thr[selected]->cgpu;
+		usb_nodev(cgpu);
+		goto retry;
 	} else
 		clear_logwin();