summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2009-10-20 11:54:06 +0000
committerfjoe <fjoe@FreeBSD.org>2009-10-20 11:54:06 +0000
commit83d6bd024d9987509c2667013d7b8dcebd195695 (patch)
tree118281353e649fb3497eacb3fd287c96f5a7a9a2 /sys/tools
parentf987b7e2e657b1ac2d5443c1dbf43ef41cc7fa4f (diff)
downloadFreeBSD-src-83d6bd024d9987509c2667013d7b8dcebd195695.zip
FreeBSD-src-83d6bd024d9987509c2667013d7b8dcebd195695.tar.gz
Allow KMOD with hypens and dots.
MFC after: 1 week
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/fw_stub.awk16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/tools/fw_stub.awk b/sys/tools/fw_stub.awk
index ddcca01..5f6fe45 100644
--- a/sys/tools/fw_stub.awk
+++ b/sys/tools/fw_stub.awk
@@ -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; file_i++) {
}
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)
OpenPOWER on IntegriCloud