Commit 261677d1ac41016bb7cf52daddba9b621551f584

nelisky 2012-03-20T19:47:23

Adding serial number to status line. Also preventing segfault on device removal.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/ztex.c b/ztex.c
index 2ec5ce4..ea553cb 100644
--- a/ztex.c
+++ b/ztex.c
@@ -270,8 +270,10 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work,
 
 static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
 {
-  tailsprintf(buf, "%dMhz", cgpu->device->freqM1 * (cgpu->device->freqM + 1));
-  tailsprintf(buf, "| ");
+  if (cgpu->deven == DEV_ENABLED) {
+    tailsprintf(buf, "%s | ", cgpu->device->snString);
+    tailsprintf(buf, "%dMhz | ", cgpu->device->freqM1 * (cgpu->device->freqM + 1));
+  }
 }
 
 static bool ztex_prepare(struct thr_info *thr)