From owner-freebsd-arch@FreeBSD.ORG Wed Jan 19 20:28:20 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF658106564A for ; Wed, 19 Jan 2011 20:28:20 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7A90B8FC1C for ; Wed, 19 Jan 2011 20:28:20 +0000 (UTC) Received: by iyb26 with SMTP id 26so1159426iyb.13 for ; Wed, 19 Jan 2011 12:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=6BIKT3hwTdGSsnCKr1WZh5xj/p7OSinUde7dShOq11E=; b=BSAroQnveoks+PFcg6ijVRmXf5Ek4AuNoyJRf1P+FuF9IgU4AavLv38l/oBIN60uuj 8/wp2gs78NL2bBlxlo2BcerD+clchzHfsneuDzD0wa6umGWZno+8/B7U2KYyirnO1LO2 WPaNc1MkyERMsllqYn8V3quttuIx1ToZkMHQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=iHmhLcwOaSezCfn4bDVx6ln2gsoYvbvDop+oLLR8lCeso1UIFRJAOdZW/qAAxTieYW rWGFXqOu/Em7u9gMAFnOxSnU01mwfTDGfMth5h22WuSQILfDvifNhcXrA2qsUAN3u/yu SKl+286I+nmJCArC5iw+nKW5y09U5yrhlzo4o= MIME-Version: 1.0 Received: by 10.231.40.3 with SMTP id i3mr1420963ibe.129.1295468899892; Wed, 19 Jan 2011 12:28:19 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.160.147 with HTTP; Wed, 19 Jan 2011 12:28:19 -0800 (PST) Date: Wed, 19 Jan 2011 12:28:19 -0800 X-Google-Sender-Auth: 4XuV6sCSatEQTazPyzZpbr-gFGA Message-ID: From: mdf@FreeBSD.org To: FreeBSD Arch Content-Type: text/plain; charset=ISO-8859-1 Subject: Weed-whacking sysctl(8) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 20:28:20 -0000 As bde@ mentioned, there's very little actual use of the sysctl format strings. I recently changed it so the use is even smaller, but I've got a quandary as to how to finish the job. I agree with Bruce that the formatted structs can just be removed. This leaves just the "IK" format, which shows up in just a few files: sys/dev/acpica/acpi_thermal.c: sys/dev/amdtemp/amdtemp.c sys/dev/acpi_support/atk0110.c sys/dev/coretemp/coretemp.c sys/dev/iicbus/max6690.c sys/dev/iicbus/ds1775.c I see two solutions to "IK". The first is to preserve the interface as experienced by sysctl(8) users, and add some functions to push a string buffer back to userspace, and parse a string in the kernel. The second is to preserve the binary interface as experienced by sysctl(3) users, and either have the values be dumped in the slightly obscure 10ths of Kelvin values, or add a new CTLTYPE_KELVIN so sysctl(8) can also keep showing things as it does today. Given how infrequent the use is CTLTYPE_KELVIN seems a non-starter. So who is the worse client to break: those who use sysctl(8) to look at temperatures, or those who have a utility to manipulate these values using sysctl(3)? Thanks, matthew