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

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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.

Other than that I think this is fine.

-- 
John Baldwin



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