summaryrefslogtreecommitdiff
path: root/src/print_cpu_temperature.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2012-05-09 18:56:57 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-05-09 18:56:57 +0200
commit296eb5e7063b4051927f2e2bf94e1034bf64f60c (patch)
tree9d91807302af35783372848dbd028f21494c843e /src/print_cpu_temperature.c
parent88b157cc8a19a312d93cba1f9332fc40b385e253 (diff)
Error handling: Never output null as full_text (JSON), prefix messages with i3status (Thanks Artemis)
The former made i3bar crash, the latter is helpful for debugging.
Diffstat (limited to 'src/print_cpu_temperature.c')
-rw-r--r--src/print_cpu_temperature.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/print_cpu_temperature.c b/src/print_cpu_temperature.c
index 7797f06..8e7d7f9 100644
--- a/src/print_cpu_temperature.c
+++ b/src/print_cpu_temperature.c
@@ -113,5 +113,6 @@ void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const
return;
error:
#endif
+ OUTPUT_FULL_TEXT("cant read temp");
(void)fputs("i3status: Cannot read temperature. Verify that you have a thermal zone in /sys/class/thermal or disable the cpu_temperature module in your i3status config.\n", stderr);
}