Use blank_get_statline_before for GPU devices that don't support adl monitoring.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
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;