Date: Mon, 2 Nov 2009 09:47:41 +0000 (UTC) From: Max Khon <fjoe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r198784 - stable/7/sys/tools Message-ID: <200911020947.nA29lfNG051881@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fjoe Date: Mon Nov 2 09:47:41 2009 New Revision: 198784 URL: http://svn.freebsd.org/changeset/base/198784 Log: MFC: Allow KMOD with hypens and dots. Modified: stable/7/sys/tools/fw_stub.awk Modified: stable/7/sys/tools/fw_stub.awk ============================================================================== --- stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:15 2009 (r198783) +++ stable/7/sys/tools/fw_stub.awk Mon Nov 2 09:47:41 2009 (r198784) @@ -118,6 +118,8 @@ if (!num_files || !opt_m) cfilename = opt_c; ctmpfilename = cfilename ".tmp"; +modname = opt_m; +gsub(/[-\.]/, "_", modname); printc("#include <sys/param.h>\ #include <sys/errno.h>\ @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911020947.nA29lfNG051881>