From owner-freebsd-current Sun Mar 9 9:14:57 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0B8737B401 for ; Sun, 9 Mar 2003 09:14:56 -0800 (PST) Received: from seed.net.tw (sn16.seed.net.tw [139.175.54.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8D2543F93 for ; Sun, 9 Mar 2003 09:14:53 -0800 (PST) (envelope-from leafy@leafy.idv.tw) Received: from [211.74.132.105] (port=49199 helo=leafy.idv.tw) by seed.net.tw with esmtp (Seednet 4.10:4) id 18s4Nx-000OUG-00 for freebsd-current@freebsd.org; Mon, 10 Mar 2003 01:14:53 +0800 Received: from leafy.idv.tw (nobody@localhost [127.0.0.1]) by leafy.idv.tw (8.12.8/8.12.8) with ESMTP id h29HEqr6002545 for ; Mon, 10 Mar 2003 01:14:52 +0800 (CST) (envelope-from leafy@leafy.idv.tw) Received: (from leafy@localhost) by leafy.idv.tw (8.12.8/8.12.8/Submit) id h29HEqVn002544 for freebsd-current@freebsd.org; Mon, 10 Mar 2003 01:14:52 +0800 (CST) Date: Mon, 10 Mar 2003 01:14:52 +0800 From: leafy To: freebsd-current@freebsd.org Subject: How does a module decide what to support? Message-ID: <20030309171452.GA2510@leafy.idv.tw> Mail-Followup-To: freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Disposition: inline User-Agent: Mutt/1.5.3i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From my observations (yes, please correct me if I am wrong), that modules define what to support in their respective makefiles in the form of SRC= aaa.c bbb.c opt_*.h Where opt_*.h are automagically generated if they are not in machine@ (and the generated files are just empty files that indicate that the kernel file does not specify this option), else they are linked from machine@. If some makefile list SRC= a.c b.c opt_inet.h opt_inet6.h and kernel config lists 'option INET' *only*, then opt_inet.h has '#define INET 1' in it and opt_inet6.h is empty. Is this correct? Jiawei -- "Without the userland, the kernel is useless." --inspired by The Tao of Programming To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message