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)
Jan 22 2024, 4:26 AM
Unknown Object (File)
Jan 12 2024, 10:41 AM
Unknown Object (File)
Jan 4 2024, 9:57 AM
Unknown Object (File)
Dec 24 2023, 7:45 PM
Unknown Object (File)
Dec 20 2023, 3:21 AM
Unknown Object (File)
Dec 6 2023, 4:15 AM
Unknown Object (File)
Nov 12 2023, 1:19 PM
Unknown Object (File)
Nov 9 2023, 8:32 PM
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.