History

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

Tomasz Warniełło committed 4 years ago

Commit 252b47d1 parent 834cf6b1 file · +1 −10Browse files

Showing the changes to scripts/kernel-doc (1 of 1 file). Show all

Unified · Split

scripts/kernel-doc+1−10
@@ -79,15 +79,6 @@ See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax. · 78 unmodified lines
7979 # 25/07/2012 - Added support for HTML5
8080 # -- Dan Luedtke <mail@danrl.de>
8181
82−sub usage {
83− my $message = <<"EOF";
84−Usage: $0 [OPTION ...] FILE ...
85−
86−EOF
87− print $message;
88− exit 1;
89−}
90−
9182 #
9283 # format of comments.
9384 # In the following table, (...)? signifies optional structure.
@@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { · 374 unmodified lines
468459 } elsif ($cmd eq "Werror") {
469460 $Werror = 1;
470461 } elsif (($cmd eq "h") || ($cmd eq "help")) {
471− usage();
462+ pod2usage(-exitval => 0, -verbose => 2);
472463 } elsif ($cmd eq 'no-doc-sections') {
473464 $no_doc_sections = 1;
474465 } elsif ($cmd eq 'enable-lineno') {