From owner-cvs-src@FreeBSD.ORG Tue Jun 5 05:03:52 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7ADBB16A46C; Tue, 5 Jun 2007 05:03:52 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 5183413C447; Tue, 5 Jun 2007 05:03:52 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (we8x5h2lqnyey6b0@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l5553pfb048976; Mon, 4 Jun 2007 22:03:51 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l5553pPk048975; Mon, 4 Jun 2007 22:03:51 -0700 (PDT) (envelope-from jmg) Date: Mon, 4 Jun 2007 22:03:51 -0700 From: John-Mark Gurney To: David Malone Message-ID: <20070605050351.GJ4602@funkthat.com> References: <200706041825.l54IP8RD042273@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200706041825.l54IP8RD042273@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 tsc.c src/sys/amd64/isa clock.c src/sys/cam cam_xpt.c src/sys/cam/scsi scsi_all.c src/sys/compat/opensolaris/kern opensolaris_kstat.c src/sys/dev/acpica acpi_timer.c src/sys/dev/bge if_bge.c src/sys/dev/sound clone.c ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2007 05:03:52 -0000 David Malone wrote this message on Mon, Jun 04, 2007 at 18:25 +0000: > Log: > Despite several examples in the kernel, the third argument of > sysctl_handle_int is not sizeof the int type you want to export. > The type must always be an int or an unsigned int. > > Remove the instances where a sizeof(variable) is passed to stop > people accidently cut and pasting these examples. > > In a few places this was sysctl_handle_int was being used on 64 bit > types, which would truncate the value to be exported. In these > cases use sysctl_handle_quad to export them and change the format > to Q so that sysctl(1) can still print them. Perhaps documenting SYSCTL_HANDLER_ARGS and the several standard handlers in sysctl_add_oid(9) would be in order? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."