diff --git a/lib/coproc.cpp b/lib/coproc.cpp index 4a5299701b..c477af0ca4 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -308,13 +308,29 @@ void COPROC_NVIDIA::description(char* buf) { #ifndef _USING_FCGI_ void COPROC_NVIDIA::write_xml(MIOFILE& f, bool include_request) { +unsigned long long test; + +test = strtoull("0x123456789abc", NULL, 0); + + + f.printf( "\n" " %d\n" " %s\n" " %d\n" " %d\n" - " %d\n" + " %d\n", + count, + prop.name, + have_cuda ? 1 : 0, + have_cal ? 1 : 0, + have_opencl ? 1 : 0 + ); + if (include_request) { + write_request(f); + } + f.printf( " %f\n" " %d\n" " %d\n" @@ -334,11 +350,6 @@ void COPROC_NVIDIA::write_xml(MIOFILE& f, bool include_request) { " %u\n" " %d\n" " %d\n", - count, - prop.name, - have_cuda ? 1 : 0, - have_cal ? 1 : 0, - have_opencl ? 1 : 0, peak_flops, cuda_version, display_driver_version, diff --git a/lib/parse.h b/lib/parse.h index b9dcb71be3..d22eb8d26b 100644 --- a/lib/parse.h +++ b/lib/parse.h @@ -84,13 +84,12 @@ inline unsigned long long strtoull(const char *s, char **, int) { unsigned long long y; strncpy(buf, s, sizeof(buf)-1); strip_whitespace(buf); - p = buf; p = strstr(buf, "0x"); if (!p) p = strstr(buf, "0X"); if (p) { - sscanf(p, "llx", &y); + sscanf(p, "%llx", &y); } else { - sscanf(buf, "llu", &y); + sscanf(buf, "%llu", &y); } return y; }