char *outwalk = buffer;
static char buf[16];
- if (path == NULL) {
+ if (path == NULL)
asprintf(&thermal_zone, THERMAL_ZONE, zone);
- path = thermal_zone;
- }
+ else
+ asprintf(&thermal_zone, path, zone);
+ path = thermal_zone;
INSTANCE(path);
return;
error:
#endif
- (void)fputs("Cannot read temperature\n", stderr);
+ 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);
}