Skip to content

Commit 7ce7b89

Browse files
mchehabgregkh
authored andcommitted
scripts/get_abi.pl: add a validate command
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. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2c0700e commit 7ce7b89

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎scripts/get_abi.pl‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
my ($cmd, $arg) = @ARGV;
2727

28-
pod2usage(2) if ($cmd ne "search" && $cmd ne "rest");
28+
pod2usage(2) if ($cmd ne "search" && $cmd ne "rest" && $cmd ne "validate");
2929
pod2usage(2) if ($cmd eq "search" && !$arg);
3030

3131
require Data::Dumper if ($debug);
@@ -82,7 +82,7 @@ sub parse_abi {
8282
my $sep = $2;
8383
my $content = $3;
8484

85-
if (!($new_tag =~ m/(what|date|kernelversion|contact|description|users)/)) {
85+
if (!($new_tag =~ m/(what|where|date|kernelversion|contact|description|users)/)) {
8686
if ($tag eq "description") {
8787
# New "tag" is actually part of
8888
# description. Don't consider it a tag
@@ -368,7 +368,7 @@ sub search_symbols {
368368
#
369369
if ($cmd eq "rest") {
370370
output_rest;
371-
} else {
371+
} elsif ($cmd eq "search") {
372372
search_symbols;
373373
}
374374

@@ -381,15 +381,17 @@ =head1 NAME
381381
382382
=head1 SYNOPSIS
383383
384-
B<abi_book.pl> [--debug] <COMAND> [<ARGUMENT>]
384+
B<abi_book.pl> [--debug] [--man] [--help] [--dir=<dir>] <COMAND> [<ARGUMENT>]
385385
386386
Where <COMMAND> can be:
387387
388388
=over 8
389389
390390
B<search> [SEARCH_REGEX] - search for [SEARCH_REGEX] inside ABI
391391
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
393395
394396
=back
395397
@@ -451,11 +453,11 @@ =head1 EXAMPLES
451453
452454
=head1 BUGS
453455
454-
Report bugs to Mauro Carvalho Chehab <mchehab@s-opensource.com>
456+
Report bugs to Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
455457
456458
=head1 COPYRIGHT
457459
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>.
459461
460462
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
461463

0 commit comments

Comments
 (0)