Commit 252b47da authored by Tomasz Warniełło's avatar Tomasz Warniełło Committed by Jonathan Corbet

scripts: kernel-doc: Replace the usage function

Aim: unified POD, user more satisfied, script better structured

You can see the results with:

$ scripts/kernel-doc -help
Signed-off-by: default avatarTomasz Warniełło <tomasz.warniello@gmail.com>
Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Disliked-by: default avatarAkira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/20220218181628.1411551-10-tomasz.warniello@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 834cf6b9
...@@ -79,15 +79,6 @@ See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax. ...@@ -79,15 +79,6 @@ See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax.
# 25/07/2012 - Added support for HTML5 # 25/07/2012 - Added support for HTML5
# -- Dan Luedtke <mail@danrl.de> # -- Dan Luedtke <mail@danrl.de>
sub usage {
my $message = <<"EOF";
Usage: $0 [OPTION ...] FILE ...
EOF
print $message;
exit 1;
}
# #
# format of comments. # format of comments.
# In the following table, (...)? signifies optional structure. # In the following table, (...)? signifies optional structure.
...@@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { ...@@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) {
} elsif ($cmd eq "Werror") { } elsif ($cmd eq "Werror") {
$Werror = 1; $Werror = 1;
} elsif (($cmd eq "h") || ($cmd eq "help")) { } elsif (($cmd eq "h") || ($cmd eq "help")) {
usage(); pod2usage(-exitval => 0, -verbose => 2);
} elsif ($cmd eq 'no-doc-sections') { } elsif ($cmd eq 'no-doc-sections') {
$no_doc_sections = 1; $no_doc_sections = 1;
} elsif ($cmd eq 'enable-lineno') { } elsif ($cmd eq 'enable-lineno') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment