From owner-freebsd-current@FreeBSD.ORG Tue Sep 22 15:16:31 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E87C11065670 for ; Tue, 22 Sep 2009 15:16:31 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) by mx1.freebsd.org (Postfix) with ESMTP id 843158FC08 for ; Tue, 22 Sep 2009 15:16:31 +0000 (UTC) Received: from [195.4.92.21] (helo=11.mx.freenet.de) by mout3.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #92) id 1Mq76U-0000Lg-9Y; Tue, 22 Sep 2009 17:16:30 +0200 Received: from tc27e.t.pppool.de ([89.55.194.126]:17972 helo=ernst.jennejohn.org) by 11.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1Mq76U-0006v0-2d; Tue, 22 Sep 2009 17:16:30 +0200 Date: Tue, 22 Sep 2009 17:16:29 +0200 From: Gary Jennejohn To: pluknet Message-ID: <20090922171629.418a089b@ernst.jennejohn.org> In-Reply-To: References: <20090922113239.02f3653f@ernst.jennejohn.org> <295750.94482.qm@web63906.mail.re1.yahoo.com> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.2; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Barney Cordoba , current@freebsd.org Subject: Re: where is device_get_parent function defined X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 15:16:32 -0000 On Tue, 22 Sep 2009 17:37:00 +0400 pluknet wrote: > 2009/9/22 Barney Cordoba : > > > > > > --- On Tue, 9/22/09, Gary Jennejohn wrote: > > > >> From: Gary Jennejohn > >> Subject: Re: where is device_get_parent function defined > >> To: "Barney Cordoba" > >> Cc: current@freebsd.org > >> Date: Tuesday, September 22, 2009, 5:32 AM > >> On Mon, 21 Sep 2009 15:27:42 -0700 > >> (PDT) > >> Barney Cordoba > >> wrote: > >> > >> > I can't seem to find where device_get_parent() is > >> defined. > >> > > >> > >> /sys/kern/subr_bus,c > >> > >> grep -r ^device_get_parent /sys/ > > > > Thanks, I found it shortly after posting. The "problem" with grep is > > that you get about a billion lines, particularly on systems with 4 or > > 5 different kernel sources installed. > > > > Following style(9): > ### > The function type should be on a line by itself preceding the function. > > static char * > function(int a1, int a2, float fl, int a4) > ### > > So you can safely use the caret sign in regex: grep ^keyword path > Which, of course, is exactly why I used it. This style(9) rule is one big advantage which FreeBSD has over Linux. It's practically impossible to find a function in Linux because the type is always on the same line as the function declaration. Drives my crazy. --- Gary Jennejohn