Date: Thu, 5 Jul 2007 23:33:14 +0100 From: Rui Paulo <rpaulo@fnop.net> To: John Baldwin <jhb@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 122829 for review Message-ID: <200707052333.15276.rpaulo@fnop.net> In-Reply-To: <200707051751.35532.jhb@freebsd.org> References: <200707040343.l643hQ2i073492@repoman.freebsd.org> <200707051751.35532.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707052333.15276.rpaulo>
