diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-12 12:39:21 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-12 12:39:21 +0100 |
| commit | 708b8eae0fd532af73ea8350e6dcc10255ff7376 (patch) | |
| tree | f336436934fd79bc91aff7112a9beb10bc4e839f /scripts/headers_install.pl | |
| parent | mutex: improve header comment to be actually informative about the API (diff) | |
| parent | Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
| download | linux-708b8eae0fd532af73ea8350e6dcc10255ff7376.tar.gz linux-708b8eae0fd532af73ea8350e6dcc10255ff7376.zip | |
Merge branch 'linus' into core/locking
Diffstat (limited to 'scripts/headers_install.pl')
| -rw-r--r-- | scripts/headers_install.pl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 68591cd08731..7d2b4146e02f 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # # headers_install prepare the listed header files for use in # user space and copy the files to their destination. @@ -17,28 +17,29 @@ # 3) Drop all sections defined out by __KERNEL__ (using unifdef) use strict; -use warnings; my ($readdir, $installdir, $arch, @files) = @ARGV; my $unifdef = "scripts/unifdef -U__KERNEL__"; foreach my $file (@files) { + local *INFILE; + local *OUTFILE; my $tmpfile = "$installdir/$file.tmp"; - open(my $infile, '<', "$readdir/$file") + open(INFILE, "<$readdir/$file") or die "$readdir/$file: $!\n"; - open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n"; - while (my $line = <$infile>) { + open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n"; + while (my $line = <INFILE>) { $line =~ s/([\s(])__user\s/$1/g; $line =~ s/([\s(])__force\s/$1/g; $line =~ s/([\s(])__iomem\s/$1/g; $line =~ s/\s__attribute_const__\s/ /g; $line =~ s/\s__attribute_const__$//g; $line =~ s/^#include <linux\/compiler.h>//; - printf $outfile "%s", $line; + printf OUTFILE "%s", $line; } - close $outfile; - close $infile; + close OUTFILE; + close INFILE; system $unifdef . " $tmpfile > $installdir/$file"; unlink $tmpfile; } |
