From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 10:33:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C70C71065673 for ; Fri, 7 Mar 2008 10:33:27 +0000 (UTC) (envelope-from dumbbell@freebsd.org) Received: from mail.ilius.net (mail.ilius.net [62.23.30.92]) by mx1.freebsd.org (Postfix) with ESMTP id 329538FC2D for ; Fri, 7 Mar 2008 10:33:26 +0000 (UTC) (envelope-from dumbbell@freebsd.org) Received: from viking.ilius.fr [192.168.192.55] by mail.ilius.net with ESMTP (SMTPD-9.22) id A4C32B1C; Fri, 07 Mar 2008 11:11:15 +0100 Message-ID: <47D114C5.2000108@freebsd.org> Date: Fri, 07 Mar 2008 11:11:17 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Thunderbird 2.0.0.12 (X11/20080229) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: sysctl: good practices and how to deprecate a node X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 10:33:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I'm currently working again on the Synaptics Touchpad support[1] in psm(4). The enable_synaptics() probe function adds a subtree to "hw.psm"; I didn't changed its behaviour for now. This subtree is created only if: o "hw.psm.synaptics_support" is true o no previous probe function "took" the device. If the function doesn't find a Synaptics touchpad, the tree is left created. First, is enable_synaptics() the right place to add this subtree (compared to a "globally" created tree, like "hw.psm")? If enable_synaptics() is the way to go, should it be always created if "hw.psm.synaptics_support" is true, even if no touchpad is found? Or only when the touchpad is detected? In psmsoftintr(), the code in FreeBSD doesn't check for bad sysctl values. My patch doesn't do it either for now. But wrong values could cause division by zero for example. Is there a way to check sysctls only when they are modified, instead of before every use? Last question: I expanded the Synaptics subtree with my own nodes but there are three nodes which are not used anymore. How should I handle deprecation of these nodes? Thanks :) [1] See the wiki: http://wiki.freebsd.org/SynapticsTouchpad - -- Jean-Sébastien Pédron http://www.dumbbell.fr/ PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfRFMUACgkQa+xGJsFYOlOrZwCfbtAZw1nZ6xImO+azyprKfl+1 kGcAnjifjCtz3BvXkuj9sEWuCUakKvp1 =oLs1 -----END PGP SIGNATURE-----