svn commit: r265478 - stable/9/sys/dev/cxgbe

Navdeep Parhar np at freebsd.org
Wed May 7 02:52:35 UTC 2014


On Tue, May 06, 2014 at 10:38:42PM -0400, Ryan Stone wrote:
> On Tue, May 6, 2014 at 10:13 PM, Navdeep Parhar <np at freebsd.org> wrote:
> > +       SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT |
> > +           CTLFLAG_RD, sc, 0, sysctl_temperature, "A",
> > +           "chip temperature (in Celsius)");
> 
> I believe that this is incorrect.  "A" is used for strings (I guess it
> stands for ASCII?).  I would suggest using "IK", which is an
> indication that the return value is an integer in tenths of degrees
> Kelvin.  sysctl(8) will handle this value specially and print it in
> degrees C.

This was fixed by emax@ in head and I do plan to MFC his fix to stable/9.

> 
> You can take a look at dev/coretemp, which uses this sysctl format.

Thanks, I'll take a look.  'K' seems to be useful.

Regards,
Navdeep


More information about the svn-src-stable-9 mailing list