Commit 5d581cb5d7234328eafd6eb52ad98f98f18d9e78

Con Kolivas 2013-02-09T19:27:57

Use blank_get_statline_before for GPU devices that don't support adl monitoring.

diff --git a/cgminer.c b/cgminer.c
index ef7efa6..acf3880 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6370,7 +6370,7 @@ static void noop_reinit_device(struct cgpu_info __maybe_unused *cgpu)
 {
 }
 
-static void blank_get_statline_before(char *buf, struct cgpu_info __maybe_unused *cgpu)
+void blank_get_statline_before(char *buf, struct cgpu_info __maybe_unused *cgpu)
 {
 	tailsprintf(buf, "               | ");
 }
diff --git a/driver-opencl.c b/driver-opencl.c
index 9e9e401..8580b22 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1287,7 +1287,8 @@ static void get_opencl_statline_before(char *buf, struct cgpu_info *gpu)
 		else
 			tailsprintf(buf, "        ");
 		tailsprintf(buf, "| ");
-	}
+	} else
+		gpu->drv->get_statline_before = &blank_get_statline_before;
 }
 #endif
 
diff --git a/miner.h b/miner.h
index 0902228..58d125f 100644
--- a/miner.h
+++ b/miner.h
@@ -268,6 +268,8 @@ struct gpu_adl {
 };
 #endif
 
+extern void blank_get_statline_before(char *buf, struct cgpu_info __maybe_unused *cgpu);
+
 struct api_data;
 struct thr_info;
 struct work;