1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Merge pull request #87 from X0rg/master

Fixes related to #84
This commit is contained in:
Veselin Georgiev 2017-03-04 18:18:56 +00:00 committed by GitHub
commit 2a2d43b9a3
2 changed files with 4 additions and 4 deletions

View file

@ -447,11 +447,11 @@ static void print_info(output_data_switch query, struct cpu_raw_data_t* raw,
if ((value = cpu_msrinfo(handle, INFO_APERF)) != CPU_INVALID_VALUE)
fprintf(fout, " MSR.aperf : %d MHz\n", value);
if ((value = cpu_msrinfo(handle, INFO_MIN_MULTIPLIER)) != CPU_INVALID_VALUE)
fprintf(fout, " min. multi.: %d\n", value / 100.0);
fprintf(fout, " min. multi.: %.2lf\n", value / 100.0);
if ((value = cpu_msrinfo(handle, INFO_CUR_MULTIPLIER)) != CPU_INVALID_VALUE)
fprintf(fout, " cur. multi.: %d\n", value / 100.0);
fprintf(fout, " cur. multi.: %.2lf\n", value / 100.0);
if ((value = cpu_msrinfo(handle, INFO_MAX_MULTIPLIER)) != CPU_INVALID_VALUE)
fprintf(fout, " max. multi.: %d\n", value / 100.0);
fprintf(fout, " max. multi.: %.2lf\n", value / 100.0);
if ((value = cpu_msrinfo(handle, INFO_TEMPERATURE)) != CPU_INVALID_VALUE)
fprintf(fout, " temperature: %d degrees Celsius\n", value);
if ((value = cpu_msrinfo(handle, INFO_THROTTLING)) != CPU_INVALID_VALUE)

View file

@ -936,11 +936,11 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
return CPU_INVALID_VALUE;
}
info.handle = handle;
if (!init) {
err = cpuid_get_raw_data(&raw);
err += cpu_ident_internal(&raw, &id, &internal);
info.cpu_clock = cpu_clock_measure(250, 1);
info.handle = handle;
info.id = &id;
info.internal = &internal;
init = 1;