Date: Tue, 6 May 2014 19:52:27 -0700 From: Navdeep Parhar <np@freebsd.org> To: Ryan Stone <rysto32@gmail.com> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r265478 - stable/9/sys/dev/cxgbe Message-ID: <20140507025213.GA5199@ox> In-Reply-To: <CAFMmRNw5DvJvoxHdnLr4sZOGLnhK=W1oKDMtJS%2BBp=VPsDx02g@mail.gmail.com> References: <201405070213.s472Dtip073500@svn.freebsd.org> <CAFMmRNw5DvJvoxHdnLr4sZOGLnhK=W1oKDMtJS%2BBp=VPsDx02g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140507025213.GA5199>