Sometimes, we just want the parser to retrieve all symbols from ABI, in order to check for parsing errors. So, add a new "validate" command. While here, update the man/help pages.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -25,7 +25,7 @@ pod2usage(2) if (scalar @ARGV < 1 || @ARGV > 2); · 24 unmodified lines | |||
| 25 | 25 | ||
| 26 | my ($cmd, $arg) = @ARGV; | 26 | my ($cmd, $arg) = @ARGV; |
| 27 | 27 | ||
| 28 | pod2usage(2) if ($cmd ne "search" && $cmd ne "rest"); | 28 | pod2usage(2) if ($cmd ne "search" && $cmd ne "rest" && $cmd ne "validate"); |
| 29 | pod2usage(2) if ($cmd eq "search" && !$arg); | 29 | pod2usage(2) if ($cmd eq "search" && !$arg); |
| 30 | 30 | ||
| 31 | require Data::Dumper if ($debug); | 31 | require Data::Dumper if ($debug); |
| @@ -82,7 +82,7 @@ sub parse_abi { · 50 unmodified lines | |||
| 82 | my $sep = $2; | 82 | my $sep = $2; |
| 83 | my $content = $3; | 83 | my $content = $3; |
| 84 | 84 | ||
| 85 | if (!($new_tag =~ m/(what|date|kernelversion|contact|description|users)/)) { | 85 | if (!($new_tag =~ m/(what|where|date|kernelversion|contact|description|users)/)) { |
| 86 | if ($tag eq "description") { | 86 | if ($tag eq "description") { |
| 87 | # New "tag" is actually part of | 87 | # New "tag" is actually part of |
| 88 | # description. Don't consider it a tag | 88 | # description. Don't consider it a tag |
| @@ -368,7 +368,7 @@ print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug); · 279 unmodified lines | |||
| 368 | # | 368 | # |
| 369 | if ($cmd eq "rest") { | 369 | if ($cmd eq "rest") { |
| 370 | output_rest; | 370 | output_rest; |
| 371 | } else { | 371 | } elsif ($cmd eq "search") { |
| 372 | search_symbols; | 372 | search_symbols; |
| 373 | } | 373 | } |
| 374 | 374 | ||
| @@ -381,7 +381,7 @@ abi_book.pl - parse the Linux ABI files and produce a ReST book. · 6 unmodified lines | |||
| 381 | 381 | ||
| 382 | =head1 SYNOPSIS | 382 | =head1 SYNOPSIS |
| 383 | 383 | ||
| 384 | B<abi_book.pl> [--debug] <COMAND> [<ARGUMENT>] | 384 | B<abi_book.pl> [--debug] [--man] [--help] [--dir=<dir>] <COMAND> [<ARGUMENT>] |
| 385 | 385 | ||
| 386 | Where <COMMAND> can be: | 386 | Where <COMMAND> can be: |
| 387 | 387 | ||
| @@ -389,7 +389,9 @@ Where <COMMAND> can be: · 1 unmodified line | |||
| 389 | 389 | ||
| 390 | B<search> [SEARCH_REGEX] - search for [SEARCH_REGEX] inside ABI | 390 | B<search> [SEARCH_REGEX] - search for [SEARCH_REGEX] inside ABI |
| 391 | 391 | ||
| 392 | B<rest> - output the ABI in ReST markup language | 392 | B<rest> - output the ABI in ReST markup language |
| 393 | |||
| 394 | B<validate> - validate the ABI contents | ||
| 393 | 395 | ||
| 394 | =back | 396 | =back |
| 395 | 397 | ||
| @@ -451,11 +453,11 @@ $ scripts/get_abi.pl rest --dir Documentation/ABI/obsolete · 55 unmodified lines | |||
| 451 | 453 | ||
| 452 | =head1 BUGS | 454 | =head1 BUGS |
| 453 | 455 | ||
| 454 | Report bugs to Mauro Carvalho Chehab <mchehab@s-opensource.com> | 456 | Report bugs to Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 455 | 457 | ||
| 456 | =head1 COPYRIGHT | 458 | =head1 COPYRIGHT |
| 457 | 459 | ||
| 458 | Copyright (c) 2016-2017 by Mauro Carvalho Chehab <mchehab@s-opensource.com>. | 460 | Copyright (c) 2016-2019 by Mauro Carvalho Chehab <mchehab+samsung@kernel.org>. |
| 459 | 461 | ||
| 460 | License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. | 462 | License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. |
| 461 | 463 | ||