fix export_report.pl
PATCH 1/1 fix export_report.pl
This patch fixes an annoying bug of export_report.pl missing the usages of some exports.
---
This patch has been sent on:
- 14 Aug 2007
scripts/export_report.pl +1 -1
@@ -112,7 +112,7 @@ foreach my $thismod (@allcfiles) { next; } if ($state eq 2) { - if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { + if ( $_ !~ /0x[0-9a-f]+,/ ) { next; } my $sym = (split /([,"])/,)[4];
Quoted 13 lines · Adrian Bunk
This patch fixes an annoying bug of export_report.pl missing the usages of some exports.
Signed-off-by Adrian Bunk <[email protected]>---
This patch has been sent on:
- 14 Aug 2007
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 114
Quoted 3 lines
scripts/export_report.pl +0
-0@@ -112,7 +112,7 @@ foreach my $thismod (@allcfiles) { next; } if ($state eq 2) {
Perl: == for numbers, eq for strings. SH: == for strings, -eq for numbers. PHP: == for everything.
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 115
Quoted 2 lines
scripts/export_report.pl +1
-1- if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { + if ( $_ !~ /0x[0-9a-f]+,/ ) {
I have not looked closer at it, but this looks like it should be /0x[0-9a-fA-F]+,/ or
/0x[0-9a-f]+,/i
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 118
Quoted 4 lines
scripts/export_report.pl +0
-0next; } my $sym = (split /([,"])/,)[4];
Jan
Quoted 12 lines · Jan Engelhardt
Quoted 10 lines · Adrian Bunk
This patch fixes an annoying bug of export_report.pl missing the usages of some exports.
Signed-off-by Adrian Bunk <[email protected]>---
This patch has been sent on:
- 14 Aug 2007
Quoted 10 lines
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 114
Quoted 6 lines
scripts/export_report.pl +0
-0@@ -112,7 +112,7 @@ foreach my $thismod (@allcfiles) { next; } if ($state eq 2) {Perl: == for numbers, eq for strings. SH: == for strings, -eq for numbers. PHP: == for everything.
I don't care whether it compares strings or numbers as long as it works...
I'm not the author of this script, and my patch fixes the one annoying bug I observed when using it.
Feel free to improve the script, but that's unrelated to my bugfix.
Quoted 7 lines
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 115
Quoted 2 lines
scripts/export_report.pl +1
-1- if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { + if ( $_ !~ /0x[0-9a-f]+,/ ) {I have not looked closer at it, but this looks like it should be /0x[0-9a-fA-F]+,/ or
/0x[0-9a-f]+,/i
...
You should have looked closer before sending your email.
Quoted 1 line
Jan
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedPATCH 1/1 fix export_report.pl on top of adrian's fix
Fixes some subtle perl coding bug observed
by Jan Engelhardt <[email protected]>
This patch applies on top of Adrian's fix.
--- scripts/export_report.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/export_report.pl +4 -4
@@ -103,15 +103,15 @@ foreach my $thismod (@allcfiles) { my $state=0; while ( <MODULE_MODULE> ) { chomp; - if ($state eq 0) { + if ($state == 0) { $state = 1 if ($_ =~ /static const struct modversion_info/); next; } - if ($state eq 1) { + if ($state == 1) { $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/); next; } - if ($state eq 2) { + if ($state == 2) { if ( $_ !~ /0x[0-9a-f]+,/ ) { next; }
@@ -121,7 +121,7 @@ foreach my $thismod (@allcfiles) { push(@{$MODULE{$thismod}} , $sym); } } - if ($state ne 2) { + if ($state != 2) { print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; } close(MODULE_MODULE);
Quoted 13 lines · Adrian Bunk
This patch fixes an annoying bug of export_report.pl missing the usages of some exports.
Signed-off-by Adrian Bunk <[email protected]>---
This patch has been sent on:
- 14 Aug 2007
scripts/export_report.pl foreach my $thismod (@allcfiles) { · line 118
Quoted 8 lines
scripts/export_report.pl +1
-1@@ -112,7 +112,7 @@ foreach my $thismod (@allcfiles) { next; } if ($state eq 2) { - if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { + if ( $_ !~ /0x[0-9a-f]+,/ ) { next; } my $sym = (split /([,"])/,)[4];
Adrian,
I am fine with these changes.
RP
Quoted 2 lines · Adrian Bunk
This patch fixes an annoying bug of export_report.pl missing the usages of some exports.
Applied to kbuild.git plus Ram Pai's patch too.
Sam