mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-09 06:02:43 +00:00
Replace some printf() in opencl.c with event_log_info()
This commit is contained in:
parent
5906f1ab54
commit
001ba8a655
58
src/opencl.c
58
src/opencl.c
@ -2816,7 +2816,8 @@ void opencl_ctx_devices_show (hashcat_ctx_t *hashcat_ctx)
|
|||||||
{
|
{
|
||||||
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
||||||
|
|
||||||
printf ("OpenCL Info:" EOL EOL);
|
event_log_info (hashcat_ctx, "OpenCL Info:");
|
||||||
|
event_log_info (hashcat_ctx, "");
|
||||||
|
|
||||||
cl_uint platforms_cnt = opencl_ctx->platforms_cnt;
|
cl_uint platforms_cnt = opencl_ctx->platforms_cnt;
|
||||||
cl_platform_id *platforms = opencl_ctx->platforms;
|
cl_platform_id *platforms = opencl_ctx->platforms;
|
||||||
@ -2832,18 +2833,11 @@ void opencl_ctx_devices_show (hashcat_ctx_t *hashcat_ctx)
|
|||||||
char *platform_name = platforms_name[platforms_idx];
|
char *platform_name = platforms_name[platforms_idx];
|
||||||
char *platform_version = platforms_version[platforms_idx];
|
char *platform_version = platforms_version[platforms_idx];
|
||||||
|
|
||||||
printf
|
event_log_info (hashcat_ctx, "Platform ID #%u", platforms_idx + 1);
|
||||||
(
|
event_log_info (hashcat_ctx, " Vendor : %s", platform_vendor);
|
||||||
"Platform ID #%u" EOL
|
event_log_info (hashcat_ctx, " Name : %s", platform_name);
|
||||||
" Vendor : %s" EOL
|
event_log_info (hashcat_ctx, " Version : %s", platform_version);
|
||||||
" Name : %s" EOL
|
event_log_info (hashcat_ctx, "");
|
||||||
" Version : %s" EOL
|
|
||||||
"" EOL,
|
|
||||||
platforms_idx + 1,
|
|
||||||
platform_vendor,
|
|
||||||
platform_name,
|
|
||||||
platform_version
|
|
||||||
);
|
|
||||||
|
|
||||||
for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++)
|
for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++)
|
||||||
{
|
{
|
||||||
@ -2863,32 +2857,18 @@ void opencl_ctx_devices_show (hashcat_ctx_t *hashcat_ctx)
|
|||||||
char *device_version = hc_device_param->device_version;
|
char *device_version = hc_device_param->device_version;
|
||||||
char *driver_version = hc_device_param->driver_version;
|
char *driver_version = hc_device_param->driver_version;
|
||||||
|
|
||||||
printf
|
event_log_info (hashcat_ctx, " Device ID #%u", devices_idx + 1);
|
||||||
(
|
event_log_info (hashcat_ctx, " Type : %s", ((device_type & CL_DEVICE_TYPE_CPU) ? "CPU" : ((device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "Accelerator")));
|
||||||
" Device ID #%u" EOL
|
event_log_info (hashcat_ctx, " Vendor ID : %u", device_vendor_id);
|
||||||
" Type : %s" EOL
|
event_log_info (hashcat_ctx, " Vendor : %s", device_vendor);
|
||||||
" Vendor ID : %u" EOL
|
event_log_info (hashcat_ctx, " Name : %s", device_name);
|
||||||
" Vendor : %s" EOL
|
event_log_info (hashcat_ctx, " Version : %s", device_version);
|
||||||
" Name : %s" EOL
|
event_log_info (hashcat_ctx, " Processor(s) : %u", device_processors);
|
||||||
" Version : %s" EOL
|
event_log_info (hashcat_ctx, " Clock : %u", device_maxclock_frequency);
|
||||||
" Processor(s) : %u" EOL
|
event_log_info (hashcat_ctx, " Memory : %" PRIu64 "/%" PRIu64 " MB allocatable", device_maxmem_alloc / 1024 / 1024, device_global_mem / 1024 / 1024);
|
||||||
" Clock : %u" EOL
|
event_log_info (hashcat_ctx, " OpenCL Version : %u", device_opencl_version);
|
||||||
" Memory : %" PRIu64 "/%" PRIu64 " MB allocatable" EOL
|
event_log_info (hashcat_ctx, " Driver Version : %u", driver_version);
|
||||||
" OpenCL Version : %s" EOL
|
event_log_info (hashcat_ctx, "");
|
||||||
" Driver Version : %s" EOL
|
|
||||||
"" EOL,
|
|
||||||
devices_idx + 1,
|
|
||||||
((device_type & CL_DEVICE_TYPE_CPU) ? "CPU" : ((device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "Accelerator")),
|
|
||||||
device_vendor_id,
|
|
||||||
device_vendor,
|
|
||||||
device_name,
|
|
||||||
device_version,
|
|
||||||
device_processors,
|
|
||||||
device_maxclock_frequency,
|
|
||||||
device_maxmem_alloc / 1024 / 1024, device_global_mem / 1024 / 1024,
|
|
||||||
device_opencl_version,
|
|
||||||
driver_version
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user