From owner-p4-projects@FreeBSD.ORG Thu Jul 5 22:33:26 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5DE4D16A469; Thu, 5 Jul 2007 22:33:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D58316A400; Thu, 5 Jul 2007 22:33:26 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2B713C45D; Thu, 5 Jul 2007 22:33:25 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 22843690CE1; Thu, 5 Jul 2007 23:28:34 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id D58B6690D05; Thu, 5 Jul 2007 23:28:33 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local (87-196-93-104.net.novis.pt [87.196.93.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by core.fnop.net (Postfix) with ESMTP id 3B0A1690CE1; Thu, 5 Jul 2007 23:28:30 +0100 (WEST) From: Rui Paulo To: John Baldwin Date: Thu, 5 Jul 2007 23:33:14 +0100 User-Agent: KMail/1.9.6 References: <200707040343.l643hQ2i073492@repoman.freebsd.org> <200707051751.35532.jhb@freebsd.org> In-Reply-To: <200707051751.35532.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707052333.15276.rpaulo@fnop.net> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Perforce Change Reviews Subject: Re: PERFORCE change 122829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2007 22:33:26 -0000 On Thursday 05 July 2007 22:51:35 John Baldwin wrote: > > > #define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \ > > asmc_mb_sysctl_sms_z > > @@ -253,21 +257,20 @@ > > */ > > sysctl_ctx_init(&sc->sc_sysctl_ctx); > > sc->sc_root_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx, > > - SYSCTL_STATIC_CHILDREN(_hw), > > - OID_AUTO, > > - device_get_name(dev), > > - CTLFLAG_RD, 0, > > - device_get_desc(dev)); > > + SYSCTL_STATIC_CHILDREN(_hw), > > + OID_AUTO, > > + device_get_name(dev), > > + CTLFLAG_RD, 0, > > + device_get_desc(dev)); > > It's actually 4 spaces from the start of the previous line, not the start > of the function name or macro on the previous line, thus: > sc->sc_root_tree = SYSCTL_ADD_NODE(&sc->sc_sysctl_ctx, > SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_name(dev), > CTL_FLAG_RD, 0, device_get_desc(dev)); Right. I didn't have your dot.emacs when I did this. :-) > However, why are you creating your own sysctl tree? new-bus already > provides one in dev.foo.X. You can use 'device_get_sysctl_ctx()' > and 'device_get_sysctl_tree()' with SYSCTL_ADD_*() to hang custom nodes off > the existing tree which is preferable to doing your own thing under hw. Ok. I felt like hw.asmc was preferable. Will change it in a couple of minutes. Thanks. -- Rui Paulo