bcm: provide /dev/cputemp in a format stats can understand
This commit is contained in:
parent
daf153009e
commit
8e9d2434e9
1 changed files with 3 additions and 3 deletions
|
@ -160,9 +160,9 @@ cputyperead(Chan*, void *a, long n, vlong offset)
|
|||
static long
|
||||
cputempread(Chan*, void *a, long n, vlong offset)
|
||||
{
|
||||
char str[16];
|
||||
|
||||
snprint(str, sizeof str, "%ud\n", (getcputemp()+500)/1000);
|
||||
char str[32];
|
||||
uint t = getcputemp();
|
||||
snprint(str, sizeof str, "%ud.%ud\n", t/1000, t%1000);
|
||||
return readstr(offset, a, n, str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue