Page MenuHomeFreeBSD

jedec_ts(4) is broken on stable/10
ClosedPublic

Authored by rpokala on Jan 26 2018, 12:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 8, 1:37 PM
Unknown Object (File)
Sep 11 2025, 9:33 AM
Unknown Object (File)
Aug 30 2025, 6:43 AM
Unknown Object (File)
Aug 20 2025, 11:29 PM
Unknown Object (File)
Aug 14 2025, 1:59 PM
Unknown Object (File)
Aug 5 2025, 12:58 PM
Unknown Object (File)
Aug 4 2025, 1:43 AM
Unknown Object (File)
Jul 4 2025, 1:24 AM
Subscribers

Details

Summary

jedec_ts(4) uses a sysctl format specifier of "IK4", to indicate that it
reports milliKelvin. However, sysctl(8) on stable/10 only knows about "IK",
without a numeric suffix, which represents deciKelvin.

Adjust the format specifier, and round the temperature value reported.

Test Plan

Load jedec_ts(4) on stable/10; note that the temperature reported is reasonable.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/jedec_ts/jedec_ts.c
197 ↗(On Diff #38466)

Would (temp + 500) / 1000 work just well here?

sys/dev/jedec_ts/jedec_ts.c
197 ↗(On Diff #38466)

Yes, of course. That was the exact one-liner idiom I was thinking of, but couldn't remember at the time.

Use the obvious one-liner, which somehow escaped me at the time of the
original diff. Thanks, avg@!

LGTM.
Please fix the whitespace issue.

sys/dev/jedec_ts/jedec_ts.c
197 ↗(On Diff #38466)

Thanks! Seems like indentation of this line is incorrect now (spaces vs tabs).

This revision is now accepted and ready to land.Jan 31 2018, 3:31 PM

Leading 8-space -> hard-tab. Whoops!

This revision now requires review to proceed.Jan 31 2018, 4:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 8 2018, 9:24 AM
This revision was automatically updated to reflect the committed changes.