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.
Unified · Split
| @@ -25,7 +25,7 @@ pod2usage(2) if (scalar @ARGV < 1 || @ARGV > 2); · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 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 | 29 | pod2usage(2) if ($cmd eq "search" && !$arg); |
| 30 | 30 | |
| 31 | 31 | require Data::Dumper if ($debug); |
| @@ -82,7 +82,7 @@ sub parse_abi { · 50 unmodified lines | ||
| 82 | 82 | my $sep = $2; |
| 83 | 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 | 86 | if ($tag eq "description") { |
| 87 | 87 | # New "tag" is actually part of |
| 88 | 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 | 369 | if ($cmd eq "rest") { |
| 370 | 370 | output_rest; |
| 371 | −} else { | |
| 371 | +} elsif ($cmd eq "search") { | |
| 372 | 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 | 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 | 386 | Where <COMMAND> can be: |
| 387 | 387 | |
| @@ -389,7 +389,9 @@ Where <COMMAND> can be: · 1 unmodified line | ||
| 389 | 389 | |
| 390 | 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 | 396 | =back |
| 395 | 397 | |
| @@ -451,11 +453,11 @@ $ scripts/get_abi.pl rest --dir Documentation/ABI/obsolete · 55 unmodified lines | ||
| 451 | 453 | |
| 452 | 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 | 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 | 462 | License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. |
| 461 | 463 | |