Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 23:01:57 +0300
From:      Aleksandr Rybalko <ray@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Aleksandr Rybalko <ray@dlink.ua>, embedded@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: [RFC] hintmode switch patch
Message-ID:  <20120831230157.53c86a85.ray@freebsd.org>
In-Reply-To: <201208311031.42163.jhb@freebsd.org>
References:  <20120831154241.82902856.ray@dlink.ua> <201208311031.42163.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Aug 2012 10:31:41 -0400
John Baldwin <jhb@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to
> "freebsd-embedded-unsubscribe@freebsd.org"

Thanks!

Patch updated, and stay at same place.

WBW
-- 
Aleksandr Rybalko <ray@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120831230157.53c86a85.ray>