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

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
79# 25/07/2012 - Added support for HTML579# 25/07/2012 - Added support for HTML5
80# -- Dan Luedtke <mail@danrl.de>80# -- Dan Luedtke <mail@danrl.de>
81 81
82sub usage {
83 my $message = <<"EOF";
84Usage: $0 [OPTION ...] FILE ...
85
86EOF
87 print $message;
88 exit 1;
89}
90
91#82#
92# format of comments.83# format of comments.
93# In the following table, (...)? signifies optional structure.84# In the following table, (...)? signifies optional structure.
@@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { · 374 unmodified lines
468 } elsif ($cmd eq "Werror") {459 } elsif ($cmd eq "Werror") {
469 $Werror = 1;460 $Werror = 1;
470 } elsif (($cmd eq "h") || ($cmd eq "help")) {461 } elsif (($cmd eq "h") || ($cmd eq "help")) {
471 usage();462 pod2usage(-exitval => 0, -verbose => 2);
472 } elsif ($cmd eq 'no-doc-sections') {463 } elsif ($cmd eq 'no-doc-sections') {
473 $no_doc_sections = 1;464 $no_doc_sections = 1;
474 } elsif ($cmd eq 'enable-lineno') {465 } elsif ($cmd eq 'enable-lineno') {