Commit 79756384d43eb9cd7d307665ca8470dbf7f0af16

nelisky 2012-03-19T11:19:16

ztex Mhz reporting

diff --git a/ztex.c b/ztex.c
index fa68fdc..2ec5ce4 100644
--- a/ztex.c
+++ b/ztex.c
@@ -268,6 +268,12 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work,
   return noncecnt > 0 ? noncecnt : 1;
 }
 
+static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
+{
+  tailsprintf(buf, "%dMhz", cgpu->device->freqM1 * (cgpu->device->freqM + 1));
+  tailsprintf(buf, "| ");
+}
+
 static bool ztex_prepare(struct thr_info *thr)
 {
   struct timeval now;
@@ -303,6 +309,7 @@ static void ztex_disable (struct thr_info *thr)
 struct device_api ztex_api = {
 	.name = "ZTX",
 	.api_detect = ztex_detect,
+	.get_statline_before = ztex_statline_before,
 	.thread_prepare = ztex_prepare,
 	.scanhash = ztex_scanhash,
 	.thread_shutdown = ztex_shutdown,