Skip to content

Commit

Permalink
export_report: use warn() to issue WARNING, so they go to stderr
Browse files Browse the repository at this point in the history
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: Jim Cromie <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
jimc authored and michal42 committed May 24, 2011
1 parent bdabc7a commit ca995cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/export_report.pl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ sub collectcfiles {
#
# collect the usage count of each symbol.
#
my $modversion_warnings = 0;

foreach my $thismod (@allcfiles) {
my $module;

Expand Down Expand Up @@ -132,7 +134,8 @@ sub collectcfiles {
}
}
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);
}
Expand Down Expand Up @@ -166,6 +169,9 @@ sub collectcfiles {
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");
print "\nNOTE: Got $modversion_warnings CONFIG_MODVERSIONS warnings\n\n"
if $modversion_warnings;
print "~"x80 , "\n";
for my $thismod (sort keys %MODULE) {
my $list = $MODULE{$thismod};
Expand Down

0 comments on commit ca995cb

Please sign in to comment.