[RFC] hintmode switch patch
Aleksandr Rybalko
ray at freebsd.org
Fri Aug 31 20:02:03 UTC 2012
On Fri, 31 Aug 2012 10:31:41 -0400
John Baldwin <jhb at freebsd.org> wrote:
> On Friday, August 31, 2012 8:42:41 am Aleksandr Rybalko wrote:
> > Hi hackers,
> >
> > I already post that patch some time ago with proposed "dynamic
> > attach of hinted devices" patch. [1]
> >
> > But will try to do it again, step-by-step :)
> >
> > So that patch allow switch from static hints to dynamic hints.
> > That way embedded systems, which usually compiled with hints
> > (static) will be able to see/edit/add hints and/or kenv variables.
> >
> > If nobody have objections I will commit it soon.
> > Hope 2-3 days enough for that :)
> >
> > [1]
> > http://lists.freebsd.org/pipermail/freebsd-arch/2012-January/012295.html
> > [2] http://people.freebsd.org/~ray/subr_hints.c.patch
> >
> > Thanks.
>
> A few suggestions:
>
> 1) You can simplify sysctl_hintmode() if you do something like:
>
> value = hintmode;
> error = sysctl_handle_int(req, &value, 0, oidp);
> if (error || req->newptr == NULL)
> return (error);
>
> In place of doing SYSCTL_IN/OUT by hand. I prefer doing this in
> custom sysctl handlers so that the function is focused on the
> nonstandard functionality.
Very good hint, not seen that helpers before.
Thank you John!
>
> 2) I would just leave the global comment ('Access functions..') where
> it is as it seems to me to be a comment for the whole file.
>
Sometime confusing with that, operations on kenv, made in
subr_hints.c. Moved back.
> Other than that I think this is fine.
>
> --
> John Baldwin
> _______________________________________________
> freebsd-embedded at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to
> "freebsd-embedded-unsubscribe at freebsd.org"
Thanks!
Patch updated, and stay at same place.
WBW
--
Aleksandr Rybalko <ray at freebsd.org>
More information about the freebsd-embedded
mailing list