aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkmod.prov2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmod.prov b/kmod.prov
index fc23948..f66af2b 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -7,7 +7,7 @@ echo $modulelist | xargs -r /sbin/modinfo | \
$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?).*/;
if (/^vermagic:/) {
- print "kmod\($name\) = $ver" if $name && $ver;
+ print "kmod\($name\)" . ($ver ? " = $ver" : "") if $name;
undef $name; undef $ver;
}
'