From owner-svn-src-all@FreeBSD.ORG Wed May 7 02:52:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01BC6F33; Wed, 7 May 2014 02:52:35 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B81332DA; Wed, 7 May 2014 02:52:34 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id kq14so427864pab.24 for ; Tue, 06 May 2014 19:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=AIeJibXVIqnVLjJinvIeU0AXvWX8jxP97AihfDawPvc=; b=aj3FrUd6gkJyS5BNvUCt3gQPI/4hAFbHacP94Q3xy5dMPsSoDoGVaEfDCodtz8pewk VG9mcLpIFwhbdB4DznruZVM1fyKMCQjZWlVESSH+AB8Jun+4Y949oXV1wrJydyjn/05n wgC3GYlv07/Zn8RJZvdj1POibImQ7JBkbrTRuYqvJpucUliLVEXZuvvd3xlcPhxDNqlg hWBEOT81RRp5Chpi9jkxrWElOo7RaaaWRE7f4NzVW2f7M4d8u7xALJEFL9M4272Lu39O tbZ4EQ43Uv18A4L4j4VhgfdG9QVBXXr80d0z3OW5KE3dgqFo1grcMraqQ0gTAUXhQb6h ND9A== X-Received: by 10.66.164.5 with SMTP id ym5mr13477543pab.50.1399431154290; Tue, 06 May 2014 19:52:34 -0700 (PDT) Received: from ox (c-24-6-44-228.hsd1.ca.comcast.net. [24.6.44.228]) by mx.google.com with ESMTPSA id ck10sm105937225pac.0.2014.05.06.19.52.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 May 2014 19:52:32 -0700 (PDT) Sender: Navdeep Parhar Date: Tue, 6 May 2014 19:52:27 -0700 From: Navdeep Parhar To: Ryan Stone Subject: Re: svn commit: r265478 - stable/9/sys/dev/cxgbe Message-ID: <20140507025213.GA5199@ox> Mail-Followup-To: Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201405070213.s472Dtip073500@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 02:52:35 -0000 On Tue, May 06, 2014 at 10:38:42PM -0400, Ryan Stone wrote: > On Tue, May 6, 2014 at 10:13 PM, Navdeep Parhar 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