Details
- Reviewers
wblock loos darius-dons.net.au - Group Reviewers
manpages - Commits
- rS285994: Teach sysctl about the new optional suffix after IK to specify
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
probably ok but could do with an example or better comments
sbin/sysctl/sysctl.c | ||
---|---|---|
697 ↗ | (On Diff #7246) | so this int isn't just rounded to a granularity, it's actually scaled to an arbitrary amount.. do all the caller know what to do with this? Is there just one caller? |
917 ↗ | (On Diff #7246) | and the caller will never accidentally put anything in there > 9? |
922 ↗ | (On Diff #7246) | Am I right in assuming that this is the ultimate destination for the scaled number above.. do we have temperature sensors that have 3 digits of accuracy? or is this for use with "1" as a scaling factor? |
share/man/man9/sysctl.9 | ||
336 ↗ | (On Diff #7246) | this is not very clear.. an example would be nice. |
sbin/sysctl/sysctl.c | ||
---|---|---|
697 ↗ | (On Diff #7246) | There's only one caller (well, two, the input path and the output path). The number after the K is the number of digits after the decimal point reported, as an integer. |
917 ↗ | (On Diff #7246) | No. |
922 ↗ | (On Diff #7246) | Yes. Right now temperatures are reported only in deciKelvin. This allows one to report in any SI-sub units you want up to nanoKelvin (though as an integer, and for temperatures in every-day life, microKelvin is likely the limit because 2^31 tops out at 2100K). |
share/man/man9/sysctl.9 | ||
336 ↗ | (On Diff #7246) | There's no other examples in this rather terse paragraph. I am open to better wording though. |
share/man/man9/sysctl.9 | ||
---|---|---|
336 ↗ | (On Diff #7246) | Table/list form along with expanded description of the IK[n] format from imp in IRC. Using .Cm for the formats is cribbed from printf.1. Insert/replace between "Currently used format names are:" and ".It Fa descr": .Pp .Bl -tag -width "S,TYPE" -compact -offset indent .It Cm N node .It Cm A .Li "char *" .It Cm I .Li "int" .It Cm IK Ns Op Ar n temperature in Kelvin, multiplied by an optional single digit power of ten scaling factor: 1 (default) gives deciKelvin, 0 gives Kelvin, 3 gives milliKelvin .It Cm IU .Li "unsigned int" .It Cm L .Li "long" .It Cm LU .Li "unsigned long" .It Cm Q .Li "quad_t" .It Cm QU .Li "u_quad_t" .It Cm "S,TYPE" .Li "struct TYPE" structures .El |
wblock's updates. Some better comments. Less repetition, I hope.
Updating D3181: Teach sysctl about the new optional suffix after IK to specify
precision. Update input as well. Add IK to the manual (it was missing
completely).
share/man/man9/sysctl.9 | ||
---|---|---|
321 ↗ | (On Diff #7281) | I meant to leave the "currently used formats line" before this one, but looking at it now, it can be simpler and better: Current format names: |
share/man/man9/sysctl.9 | ||
---|---|---|
321 ↗ | (On Diff #7281) | "Current formats:" |
Add current formats.
Updating D3181: Teach sysctl about the new optional suffix after IK to specify
precision. Update input as well. Add IK to the manual (it was missing
completely).
Man page looks okay to me. Please check with igor -R and mandoc -Tlint, and update .Dd before commit. Thanks!