On Tue, May 06, 2014 at 10:38:42PM -0400, Ryan Stone wrote: > On Tue, May 6, 2014 at 10:13 PM, Navdeep Parhar <n...@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 _______________________________________________ svn-src-stable-9@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"