summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-07-16 03:23:20 +0000
committerJeremy Katz <katzj@redhat.com>2003-07-16 03:23:20 +0000
commita51764f258d46a2e2f0ae39f25144c6ffabb8804 (patch)
tree18980a7ca91a86f6432dd19e172608ed7c12e8f1 /utils
parent1b2f9fe18937b9f187b7fd77a50c2c7d0f369654 (diff)
downloadanaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.tar.gz
anaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.tar.xz
anaconda-a51764f258d46a2e2f0ae39f25144c6ffabb8804.zip
merge from taroon branch. product.img stuff, md can be modular, lots of
little things across the board
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile1
-rw-r--r--utils/trimmodmap43
2 files changed, 44 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 384c32571..bf81bd2b2 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -52,6 +52,7 @@ install: all
mkdir -p $(DESTDIR)/$(RUNTIMEDIR)
install -m755 genhdlist $(DESTDIR)/$(RUNTIMEDIR)
install -m755 trimpcitable $(DESTDIR)/$(RUNTIMEDIR)
+ install -m755 trimmodmap $(DESTDIR)/$(RUNTIMEDIR)
install -m755 moddeps $(DESTDIR)/$(RUNTIMEDIR)
install -m755 filtermoddeps $(DESTDIR)/$(RUNTIMEDIR)
install -m755 modlist $(DESTDIR)/$(RUNTIMEDIR)
diff --git a/utils/trimmodmap b/utils/trimmodmap
new file mode 100644
index 000000000..c33e60dd9
--- /dev/null
+++ b/utils/trimmodmap
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+open (F, $ARGV[0]);
+@ents = (<F>);
+close (F);
+
+shift @ARGV;
+
+foreach $n (@ARGV) {
+ $n =~ s/\.o$//;
+ $mods{"$n"} = $n;
+}
+
+
+while (<STDIN>) {
+ chop;
+ $line = $_;
+ s/0x0000/0x/g;
+ @a = split;
+ if ($mods{$a[0]}) {
+ if ($a[1] ne "0xffffffff" && $a[2] ne "0xffffffff") {
+ if ($a[3] eq "0xffffffff" && $a[4] eq "0xffffffff") {
+ @res = grep (/^$a[1]\t$a[2]\t"$a[0]"/, @ents);
+ if (length(@res) != 0 && ! $res[0]) {
+ print $line."\n";
+ }
+ } else {
+ @res = grep (/^$a[1]\t$a[2]\t"$a[0]"/, @ents);
+ if ($res[0]) {
+ @b = split "\t",$res[0];
+ if ($b[2] ne "\"$a[0]\"") {
+ print $line."\n";
+ }
+ } else {
+ @res = grep (/^$a[1]\t$a[2]\t$a[3]\t$a[4]\t"$a[0]"/, @ents);
+ if (!$res[0]) {
+ print $line."\n";
+ }
+ }
+ }
+ }
+ }
+}