Xinqi Bao's Git

wifi: OS split
[slstatus.git] / components / Linux / temperature.c
1 /* See LICENSE file for copyright and license details. */
2 #include <errno.h>
3 #include <stdio.h>
4 #include <string.h>
5
6 #include "../../util.h"
7
8 const char *
9 temp(const char *file)
10 {
11 int temp;
12
13 return (pscanf(file, "%d", &temp) == 1) ?
14 bprintf("%d", temp / 1000) : NULL;
15 }