Handle %d with non-default CPU temperature path.

This commit is contained in:
Ewgenij Starostin 2012-05-04 05:34:13 +02:00 committed by Michael Stapelberg
parent 7dc10f4205
commit b5f89c83cc

View File

@ -38,10 +38,11 @@ void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const
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);