1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Fix ${freq} and ${freq_g} on FreeBSD.

Reported by:	Karsten Rothemund <karsten@photor.de>


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@804 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Roman Bogorodskiy 2006-12-03 18:10:21 +00:00
parent 03d0ad83b8
commit de84fcac2a
2 changed files with 3 additions and 3 deletions

View File

@ -1995,8 +1995,7 @@ static struct text_object *construct_text_object(const char *s, const char *arg,
OBJ(acpitemp, 0) obj->data.i = open_acpi_temperature(arg);
END OBJ(acpitempf, 0) obj->data.i = open_acpi_temperature(arg);
END OBJ(acpiacadapter, 0)
#if defined(__linux__)
END OBJ(freq, 0)
END OBJ(freq, 0)
get_cpu_count();
if (!arg
|| !isdigit(arg[0])
@ -2028,6 +2027,7 @@ static struct text_object *construct_text_object(const char *s, const char *arg,
obj->data.cpu_index=atoi(&arg[0]);
}
obj->a = 1;
#if defined(__linux__)
END OBJ(voltage_mv, 0)
get_cpu_count();
if (!arg

View File

@ -514,7 +514,7 @@ get_freq(char *p_client_buffer, size_t client_buffer_size,
if (freq_sysctl == NULL)
exit(-1);
snprintf(freq_sysctl, 16, "dev.cpu.%d.freq", cpu);
snprintf(freq_sysctl, 16, "dev.cpu.%d.freq", (cpu - 1));
if (!p_client_buffer || client_buffer_size <= 0 ||
!p_format || divisor <= 0)