1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-13 16:27:54 +00:00

Update the write config to properly record device entries and remove disabled option.

This commit is contained in:
Con Kolivas 2013-05-11 15:25:42 +10:00
parent 3972fe223b
commit a923b7d3f0

View File

@ -4056,15 +4056,14 @@ void write_config(FILE *fcfg)
fprintf(fcfg, ",\n\"stop-time\" : \"%d:%d\"", schedstop.tm.tm_hour, schedstop.tm.tm_min);
if (opt_socks_proxy && *opt_socks_proxy)
fprintf(fcfg, ",\n\"socks-proxy\" : \"%s\"", json_escape(opt_socks_proxy));
#ifdef HAVE_OPENCL
for(i = 0; i < nDevs; i++)
if (gpus[i].deven == DEV_DISABLED)
break;
if (i < nDevs)
for (i = 0; i < nDevs; i++)
if (gpus[i].deven != DEV_DISABLED)
if (devices_enabled) {
for (i = 0; i < (int)(sizeof(devices_enabled) * 8) - 1; ++i) {
if (devices_enabled & (1 << i))
fprintf(fcfg, ",\n\"device\" : \"%d\"", i);
#endif
}
}
if (opt_removedisabled)
fprintf(fcfg, ",\n\"remove-disabled\" : true");
if (opt_api_allow)
fprintf(fcfg, ",\n\"api-allow\" : \"%s\"", json_escape(opt_api_allow));
if (strcmp(opt_api_description, PACKAGE_STRING) != 0)