Browse Source

Merge branch 'bugfix_ztex_statline' into bfgminer

Luke Dashjr 13 years ago
parent
commit
a271e8677b
1 changed files with 7 additions and 2 deletions
  1. 7 2
      driver-ztex.c

+ 7 - 2
driver-ztex.c

@@ -332,10 +332,15 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
 
 static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
 {
+	char before[] = "               ";
 	if (cgpu->deven == DEV_ENABLED) {
-		tailsprintf(buf, "%s-%d | ", cgpu->device_ztex->snString, cgpu->device_ztex->fpgaNum+1);
-		tailsprintf(buf, "%0.2fMhz | ", cgpu->device_ztex->freqM1 * (cgpu->device_ztex->freqM + 1));
+		const char *snString = (char*)cgpu->device_ztex->snString;
+		size_t snStringLen = strlen(snString);
+		if (snStringLen > 14)
+			snStringLen = 14;
+		memcpy(before, snString, snStringLen);
 	}
+	tailsprintf(buf, "%s| ", &before[0]);
 }
 
 static struct api_data*