提交 ca995cbf 编写于 作者: J Jim Cromie 提交者: Michal Marek

export_report: use warn() to issue WARNING, so they go to stderr

Also count CONFIG_MODVERSIONS warnings, and print a NOTE at start of
SECTION 2 if any were issued.  Section 2 will be empty if the build is
lacking this CONFIG_ item, and user may have missed the warnings, as
they're off screen.
Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 bdabc7a3
...@@ -102,6 +102,8 @@ close($module_symvers); ...@@ -102,6 +102,8 @@ close($module_symvers);
# #
# collect the usage count of each symbol. # collect the usage count of each symbol.
# #
my $modversion_warnings = 0;
foreach my $thismod (@allcfiles) { foreach my $thismod (@allcfiles) {
my $module; my $module;
...@@ -132,7 +134,8 @@ foreach my $thismod (@allcfiles) { ...@@ -132,7 +134,8 @@ foreach my $thismod (@allcfiles) {
} }
} }
if ($state != 2) { if ($state != 2) {
print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; warn "WARNING:$thismod is not built with CONFIG_MODVERSIONS enabled\n";
$modversion_warnings++;
} }
close($module); close($module);
} }
...@@ -166,6 +169,9 @@ printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel ...@@ -166,6 +169,9 @@ printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel
modules. Each module lists the modules, and the symbols from that module that modules. Each module lists the modules, and the symbols from that module that
it uses. Each listed symbol reports the number of modules using it\n"); it uses. Each listed symbol reports the number of modules using it\n");
print "\nNOTE: Got $modversion_warnings CONFIG_MODVERSIONS warnings\n\n"
if $modversion_warnings;
print "~"x80 , "\n"; print "~"x80 , "\n";
for my $thismod (sort keys %MODULE) { for my $thismod (sort keys %MODULE) {
my $list = $MODULE{$thismod}; my $list = $MODULE{$thismod};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册