summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-05-17 22:49:57 +0000
committerJeremy Katz <katzj@redhat.com>2004-05-17 22:49:57 +0000
commitca367e3d669b935fde69b40c7b6a27aea8d52193 (patch)
tree7f2417505df7f2c0fba91abccd002e616ef35d2b /utils
parentbe05ed796c8c76182f7f48efc84410cb2329972f (diff)
downloadanaconda-ca367e3d669b935fde69b40c7b6a27aea8d52193.tar.gz
anaconda-ca367e3d669b935fde69b40c7b6a27aea8d52193.tar.xz
anaconda-ca367e3d669b935fde69b40c7b6a27aea8d52193.zip
add trimusbmap (based on trimmodmap) to trim a modules.usbmap. I so
should have just written this in python...
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile1
-rwxr-xr-xutils/trimusbmap16
2 files changed, 17 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
index eb2283017..767dfde2c 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -51,6 +51,7 @@ install: all
install -m755 genhdlist $(DESTDIR)/$(RUNTIMEDIR)
install -m755 trimpcitable $(DESTDIR)/$(RUNTIMEDIR)
install -m755 trimmodmap $(DESTDIR)/$(RUNTIMEDIR)
+ install -m755 trimusbmap $(DESTDIR)/$(RUNTIMEDIR)
install -m755 moddeps $(DESTDIR)/$(RUNTIMEDIR)
install -m755 filtermoddeps $(DESTDIR)/$(RUNTIMEDIR)
install -m755 modlist $(DESTDIR)/$(RUNTIMEDIR)
diff --git a/utils/trimusbmap b/utils/trimusbmap
new file mode 100755
index 000000000..ece40a705
--- /dev/null
+++ b/utils/trimusbmap
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+foreach $n (@ARGV) {
+ $n =~ s/\.ko$//;
+ $mods{"$n"} = $n;
+}
+
+
+while (<STDIN>) {
+ chop;
+ $line = $_;
+ @a = split;
+ if ($mods{$a[0]}) {
+ print $line."\n";
+ }
+}