hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/scripts/export_report.pl
....@@ -1,7 +1,7 @@
11 #!/usr/bin/env perl
2
+# SPDX-License-Identifier: GPL-2.0-only
23 #
34 # (C) Copyright IBM Corporation 2006.
4
-# Released under GPL v2.
55 # Author : Ram Pai (linuxram@us.ibm.com)
66 #
77 # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
....@@ -52,13 +52,12 @@
5252
5353 sub collectcfiles {
5454 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, $_)
6159 }
60
+ close($fh);
6261 chomp @file;
6362 return @file;
6463 }
....@@ -95,7 +94,7 @@
9594 #
9695 while ( <$module_symvers> ) {
9796 chomp;
98
- my (undef, $symbol, $module, $gpl) = split;
97
+ my (undef, $symbol, $module, $gpl, $namespace) = split('\t');
9998 $SYMBOL { $symbol } = [ $module , "0" , $symbol, $gpl];
10099 }
101100 close($module_symvers);