From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 31 20:02:03 2012 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 972211065670; Fri, 31 Aug 2012 20:02:03 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 469A58FC18; Fri, 31 Aug 2012 20:02:03 +0000 (UTC) Received: from rnote.ddteam.net (77-193-201-46.pool.ukrtel.net [46.201.193.77]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id AED6DC4936; Fri, 31 Aug 2012 23:02:01 +0300 (EEST) Date: Fri, 31 Aug 2012 23:01:57 +0300 From: Aleksandr Rybalko To: John Baldwin 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> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , embedded@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] hintmode switch patch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 20:02:03 -0000 On Fri, 31 Aug 2012 10:31:41 -0400 John Baldwin 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