Browse Source

DevAPI: New function called to display additional processor information for "Manage devices"

Luke Dashjr 12 years ago
parent
commit
60b9c61283
2 changed files with 7 additions and 0 deletions
  1. 6 0
      miner.c
  2. 1 0
      miner.h

+ 6 - 0
miner.c

@@ -5931,6 +5931,7 @@ void manage_device(void)
 	char logline[256];
 	const char *msg = NULL;
 	struct cgpu_info *cgpu;
+	const struct device_drv *drv;
 	
 	opt_loginput = true;
 	selecting_device = true;
@@ -5938,6 +5939,7 @@ void manage_device(void)
 	
 devchange:
 	cgpu = devices[selected_device];
+	drv = cgpu->drv;
 	refresh_devstatus();
 	
 refresh:
@@ -5948,6 +5950,10 @@ refresh:
 	wattron(logwin, A_BOLD);
 	waddstr(logwin, logline);
 	wattroff(logwin, A_BOLD);
+	wlogprint("\n");
+	
+	if (drv->proc_wlogprint_status && likely(cgpu->status != LIFE_INIT))
+		drv->proc_wlogprint_status(cgpu);
 	
 	wlogprint("\n");
 	// TODO: Last share at TIMESTAMP on pool N

+ 1 - 0
miner.h

@@ -296,6 +296,7 @@ struct device_drv {
 	bool (*get_stats)(struct cgpu_info *);
 	bool (*identify_device)(struct cgpu_info *);  // e.g. to flash a led
 	char *(*set_device)(struct cgpu_info *, char *option, char *setting, char *replybuf);
+	void (*proc_wlogprint_status)(struct cgpu_info *);
 
 	// Thread-specific functions
 	bool (*thread_prepare)(struct thr_info *);