shithub: riscv

Download patch

ref: 96a39410175f5e7ceff079cf108099874569f81a
parent: 5743b4623e800b8089c254c7997988344ddef2a2
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Aug 15 20:06:38 EDT 2022

aux/acpi, aux/imx8pm: stats(1) expects two numbers for each cputemp reading

--- a/sys/src/cmd/aux/acpi.c
+++ b/sys/src/cmd/aux/acpi.c
@@ -275,7 +275,7 @@
 		t = 0;
 		if(amleval(therms[n].tmp, "", &er) >= 0)
 			t = amlint(er);
-			p += snprint(p, ep-p, "%d\n", (t - 2732)/10);
+			p += snprint(p, ep-p, "%d.0\n", (t - 2732)/10);
 	}
 
 	readstr(r, buf);
--- a/sys/src/cmd/aux/imx8pm.c
+++ b/sys/src/cmd/aux/imx8pm.c
@@ -160,7 +160,7 @@
 			snprint(msg, sizeof(msg), "brightness %d\n", getbrightness());
 		else if(r->fid->file->aux == (void*)Temp){
 			if(getcputemp(c) == 0)
-				snprint(msg, sizeof(msg), "%d\n%d\n%d\n", c[0], c[1], c[2]);
+				snprint(msg, sizeof(msg), "%d.0\n%d.0\n%d.0\n", c[0], c[1], c[2]);
 			else
 				snprint(msg, sizeof(msg), "%r\n");
 		}