From owner-svn-src-head@FreeBSD.ORG Tue Oct 20 11:54:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF5131065676; Tue, 20 Oct 2009 11:54:06 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AED848FC08; Tue, 20 Oct 2009 11:54:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9KBs6cQ066178; Tue, 20 Oct 2009 11:54:06 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9KBs69O066176; Tue, 20 Oct 2009 11:54:06 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <200910201154.n9KBs69O066176@svn.freebsd.org> From: Max Khon Date: Tue, 20 Oct 2009 11:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198277 - head/sys/tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 11:54:06 -0000 Author: fjoe Date: Tue Oct 20 11:54:06 2009 New Revision: 198277 URL: http://svn.freebsd.org/changeset/base/198277 Log: Allow KMOD with hypens and dots. MFC after: 1 week Modified: head/sys/tools/fw_stub.awk Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Tue Oct 20 11:52:39 2009 (r198276) +++ head/sys/tools/fw_stub.awk Tue Oct 20 11:54:06 2009 (r198277) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include \ #include \ @@ -139,7 +141,7 @@ for (file_i = 0; file_i < num_files; fil } printc("\nstatic int\n"\ -opt_m "_fw_modevent(module_t mod, int type, void *unused)\ +modname "_fw_modevent(module_t mod, int type, void *unused)\ {\ const struct firmware *fp, *parent;\ int error;\ @@ -206,14 +208,14 @@ printc("\t\treturn (error);\ return (EINVAL);\ }\ \ -static moduledata_t " opt_m "_fw_mod = {\ - \"" opt_m "_fw\",\ - " opt_m "_fw_modevent,\ +static moduledata_t " modname "_fw_mod = {\ + \"" modname "_fw\",\ + " modname "_fw_modevent,\ 0\ };\ -DECLARE_MODULE(" opt_m "_fw, " opt_m "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ -MODULE_VERSION(" opt_m "_fw, 1);\ -MODULE_DEPEND(" opt_m "_fw, firmware, 1, 1, 1);\ +DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ +MODULE_VERSION(" modname "_fw, 1);\ +MODULE_DEPEND(" modname "_fw, firmware, 1, 1, 1);\ "); if (opt_c)