From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 1 20:20:04 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC511065676 for ; Tue, 1 Mar 2011 20:20:04 +0000 (UTC) (envelope-from k0802647@telus.net) Received: from defout.telus.net (outbound04.telus.net [199.185.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 89CBD8FC14 for ; Tue, 1 Mar 2011 20:20:04 +0000 (UTC) Received: from edtncm04 ([199.185.220.240]) by priv-edtnes29.telusplanet.net (InterMail vM.8.01.03.00 201-2260-125-20100507) with ESMTP id <20110301200150.JALA21021.priv-edtnes29.telusplanet.net@edtncm04> for ; Tue, 1 Mar 2011 13:01:50 -0700 Received: from oliver.bc.lan ([66.183.53.162]) by edtncm04 with bizsmtp id Dw1p1g01N3VzCbE01w1p06; Tue, 01 Mar 2011 13:01:50 -0700 X-Authority-Analysis: v=1.1 cv=Hhb8vUndaQ9JqXo/Swdf63bQvjw2wPrzWawgI51+Yeo= c=1 sm=2 a=ZLM83dXrbFwA:10 a=8nJEP1OIZ-IA:10 a=rHoXDY67BRVrmH2fTW0A:9 a=j9p2Z7CruMOcpaaC82kIcMyc44EA:4 a=wPNLvfGTeEIA:10 Received: from [10.111.111.113] (unknown [10.111.111.113]) by oliver.bc.lan (Postfix) with ESMTP id 154606455; Tue, 1 Mar 2011 12:01:49 -0800 (PST) Message-ID: <4D6D50AC.701@telus.net> Date: Tue, 01 Mar 2011 12:01:48 -0800 From: Carl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <4D6C78D3.5090803@telus.net> <198718A4-4A82-4FDB-A8F6-400F132A649E@gsoft.com.au> <201103010800.35666.jhb@freebsd.org> In-Reply-To: <201103010800.35666.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 01 Mar 2011 20:30:43 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: listing all modules compiled into a kernel instance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2011 20:20:05 -0000 On 2011-03-01 3:20 AM, Maxim Khitrov wrote: > kldstat provides information about components that were loaded > dynamically. If your kernel was built with INCLUDE_CONFIG_FILE option > (enabled by default in GENERIC), then you can see the static > components using: > > config -x /boot/kernel/kernel As has been shown though, "kldstat -v" actually does show static components, at least those declared with DRIVER_MODULE(), and "config -x" does not improve on the situation at all because components like ucom were not cited in the configuration file. IMHO, there needs to be a reliable way to query an existing kernel that yields a _complete_ list of which components are actually included. On 2011-03-01 5:00 AM, John Baldwin wrote: >> Maybe ucom doesn't appear because it doesn't have a DRIVER_MODULE() >> declaration (because it isn't a driver). > > Yes, that would explain it. I can explicitly include ucom in a kernel by adding "device ucom" in the configuration file, in which case it would call DRIVER_MODULE(), right? That would then make it appear in the "kldstat -v" list? So why is it a driver when it's done explicitly, but not a driver when done implicitly? That makes no sense to me since the functionality doesn't change. IMHO, this is a bug that needs to be fixed, not just for ucom but any implicitly included driver. Who should submit a bug report? Carl / K0802647