diff options
author | Tomasz Warniełło <tomasz.warniello@gmail.com> | 2022-02-18 19:16:26 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2022-02-24 10:52:46 -0700 |
commit | 252b47da9fd9eeebbdaed448aea71010261d7dc4 (patch) | |
tree | 25dd5dd61413c7440dc760dd9e357763658a2c74 /scripts/kernel-doc | |
parent | 834cf6b9039e6f6ebd73cc4da51cc8bc802ca777 (diff) | |
download | lwn-252b47da9fd9eeebbdaed448aea71010261d7dc4.tar.gz lwn-252b47da9fd9eeebbdaed448aea71010261d7dc4.zip |
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: Tomasz Warniełło <tomasz.warniello@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Disliked-by: Akira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/20220218181628.1411551-10-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4a26a74318e6..d7ca4877eeda 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -79,15 +79,6 @@ See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax. # 25/07/2012 - Added support for HTML5 # -- Dan Luedtke <mail@danrl.de> -sub usage { - my $message = <<"EOF"; -Usage: $0 [OPTION ...] FILE ... - -EOF - print $message; - exit 1; -} - # # format of comments. # In the following table, (...)? signifies optional structure. @@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) { } elsif ($cmd eq "Werror") { $Werror = 1; } elsif (($cmd eq "h") || ($cmd eq "help")) { - usage(); + pod2usage(-exitval => 0, -verbose => 2); } elsif ($cmd eq 'no-doc-sections') { $no_doc_sections = 1; } elsif ($cmd eq 'enable-lineno') { |