Commit 95522262edddab5dd69309307cd54c46b9acdced

Con Kolivas 2012-01-05T14:32:11

Merge pull request #66 from kanoi/master If api-description is specified, save it when writing the config file

diff --git a/main.c b/main.c
index ed45056..a12a0ee 100644
--- a/main.c
+++ b/main.c
@@ -3234,6 +3234,8 @@ static void write_config(FILE *fcfg)
 		for(i = 0; i < nDevs; i++)
 			if (gpu_devices[i])
 				fprintf(fcfg, ",\n\"device\" : \"%d\"", i);
+	if (strcmp(opt_api_description, PACKAGE_STRING) != 0)
+		fprintf(fcfg, ",\n\"api-description\" : \"%s\"", opt_api_description);
 	fputs("\n}", fcfg);
 }
 
@@ -3575,7 +3577,7 @@ retry:
 	for (gpu = 0; gpu < nDevs; gpu++) {
 		struct cgpu_info *cgpu = &gpus[gpu];
 
-		wlog("GPU %d: %.1f / %.1f Mh/s | A:%d  R:%d  HW:%d  U:%.2f/m  I:2%d\n",
+		wlog("GPU %d: %.1f / %.1f Mh/s | A:%d  R:%d  HW:%d  U:%.2f/m  I:%d\n",
 			gpu, cgpu->rolling, cgpu->total_mhashes / total_secs,
 			cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
 			cgpu->utility, cgpu->intensity);