aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
Diffstat (limited to 'kmod.prov')
-rwxr-xr-xkmod.prov1
1 files changed, 1 insertions, 0 deletions
diff --git a/kmod.prov b/kmod.prov
index 95b05b2..2f0dd02 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -6,6 +6,7 @@ echo $modulelist | xargs -r /sbin/modinfo | \
perl -lne '
$name = $1 if m!^filename:\s*(?:.*/)?([^/]+)\.k?o!;
$ver = $1 if /^version:\s*[a-zA-Z]{0,6}\-?(\d+[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*-?[a-zA-Z]{0,6}\d?).*/;
+$ver =~ s/(\[|\]|\:|-)/_/;
if (/^vermagic:/) {
print "kmod\($name\)" . ($ver ? " = $ver" : "") if $name;
undef $name; undef $ver;