summaryrefslogtreecommitdiff
path: root/src/get_cpu_temperature.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/get_cpu_temperature.c')
-rw-r--r--src/get_cpu_temperature.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/get_cpu_temperature.c b/src/get_cpu_temperature.c
index 09fbd25..ca6b9df 100644
--- a/src/get_cpu_temperature.c
+++ b/src/get_cpu_temperature.c
@@ -24,7 +24,8 @@ const char *get_cpu_temperature_info() {
#if defined(LINUX)
long int temp;
- slurp(thermal_zone, buf, sizeof(buf));
+ if (!slurp(thermal_zone, buf, sizeof(buf)))
+ die("Could not open \"%s\"\n", thermal_zone);
temp = strtol(buf, NULL, 10);
if (temp == LONG_MIN || temp == LONG_MAX || temp <= 0)
(void)snprintf(buf, sizeof(buf), "T: ? C");