Change 'dev.cpu.N.temperature', sysctl I (degC) to IK (Kelvin).

Approved by:	re (rwatson)
Reviewed by:	rpaulo
Suggested by:	ume
MFC After:	3 days
This commit is contained in:
Norikatsu Shigemura 2009-09-06 12:01:29 +00:00
parent 5c61c646a3
commit 3705c38487

View File

@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$");
#include <machine/cputypes.h>
#include <machine/md_var.h>
#define TZ_ZEROC 2732
struct coretemp_softc {
device_t sc_dev;
int sc_tjmax;
@ -193,8 +195,8 @@ coretemp_attach(device_t dev)
SYSCTL_CHILDREN(device_get_sysctl_tree(pdev)),
OID_AUTO, "temperature",
CTLTYPE_INT | CTLFLAG_RD,
dev, 0, coretemp_get_temp_sysctl, "I",
"Current temperature in degC");
dev, 0, coretemp_get_temp_sysctl, "IK",
"Current temperature");
return (0);
}
@ -283,7 +285,7 @@ coretemp_get_temp_sysctl(SYSCTL_HANDLER_ARGS)
device_t dev = (device_t) arg1;
int temp;
temp = coretemp_get_temp(dev);
temp = coretemp_get_temp(dev) * 10 + TZ_ZEROC;
return (sysctl_handle_int(oidp, &temp, 0, req));
}