| .. | .. |
|---|
| 1 | 1 | #!/usr/bin/env perl |
|---|
| 2 | +# SPDX-License-Identifier: GPL-2.0-only |
|---|
| 2 | 3 | # |
|---|
| 3 | 4 | # (C) Copyright IBM Corporation 2006. |
|---|
| 4 | | -# Released under GPL v2. |
|---|
| 5 | 5 | # Author : Ram Pai (linuxram@us.ibm.com) |
|---|
| 6 | 6 | # |
|---|
| 7 | 7 | # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c |
|---|
| .. | .. |
|---|
| 52 | 52 | |
|---|
| 53 | 53 | sub collectcfiles { |
|---|
| 54 | 54 | my @file; |
|---|
| 55 | | - while (<.tmp_versions/*.mod>) { |
|---|
| 56 | | - open my $fh, '<', $_ or die "cannot open $_: $!\n"; |
|---|
| 57 | | - push (@file, |
|---|
| 58 | | - grep s/\.ko/.mod.c/, # change the suffix |
|---|
| 59 | | - grep m/.+\.ko/, # find the .ko path |
|---|
| 60 | | - <$fh>); # lines in opened file |
|---|
| 55 | + open my $fh, '< modules.order' or die "cannot open modules.order: $!\n"; |
|---|
| 56 | + while (<$fh>) { |
|---|
| 57 | + s/\.ko$/.mod.c/; |
|---|
| 58 | + push (@file, $_) |
|---|
| 61 | 59 | } |
|---|
| 60 | + close($fh); |
|---|
| 62 | 61 | chomp @file; |
|---|
| 63 | 62 | return @file; |
|---|
| 64 | 63 | } |
|---|
| .. | .. |
|---|
| 95 | 94 | # |
|---|
| 96 | 95 | while ( <$module_symvers> ) { |
|---|
| 97 | 96 | chomp; |
|---|
| 98 | | - my (undef, $symbol, $module, $gpl) = split; |
|---|
| 97 | + my (undef, $symbol, $module, $gpl, $namespace) = split('\t'); |
|---|
| 99 | 98 | $SYMBOL { $symbol } = [ $module , "0" , $symbol, $gpl]; |
|---|
| 100 | 99 | } |
|---|
| 101 | 100 | close($module_symvers); |
|---|