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.

You can take a look at dev/coretemp, which uses this sysctl format.
_______________________________________________
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"

Reply via email to