Page MenuHomeFreeBSD

D14055.id39038.diff
No OneTemporary

D14055.id39038.diff

Index: stable/10/sys/dev/jedec_ts/jedec_ts.c
===================================================================
--- stable/10/sys/dev/jedec_ts/jedec_ts.c
+++ stable/10/sys/dev/jedec_ts/jedec_ts.c
@@ -192,6 +192,10 @@
if ((val & 0x1000) != 0)
temp = -temp;
temp = temp * 625 + 2731500;
+
+ /* sysctl(8) reports deciKelvin, so round accordingly. */
+ temp = (temp + 500) / 1000;
+
err = sysctl_handle_int(oidp, &temp, 0, req);
return (err);
}
@@ -245,7 +249,7 @@
tree = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temp",
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0,
- ts_temp_sysctl, "IK4", "Current temperature");
+ ts_temp_sysctl, "IK", "Current temperature");
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 24, 5:25 PM (18 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28963152
Default Alt Text
D14055.id39038.diff (757 B)

Event Timeline