PERFORCE change 122829 for review
Rui Paulo
rpaulo at fnop.net
Thu Jul 5 22:33:26 UTC 2007
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
More information about the p4-projects
mailing list