]> granicus.if.org Git - strace/commit
Add support for long options
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 24 Sep 2019 21:35:26 +0000 (21:35 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 25 Sep 2019 01:02:03 +0000 (01:02 +0000)
commit99960ba0a1ff371ee7d0ee3709bd0539fa2328a6
tree28601b0215827dace677bc13890d8668af3ee826
parentd24458b299e8a53d44c515f10f693cd7fc4d43ab
Add support for long options

Recognize --help and --version options as aliases to -h and -V options,
respectively.

* strace.c: Include <getopt.h>.
(init): Move short options to optstring, add longopts array, use
getopt_long instead of getopt.
(usage): Document --help and --version options.
* strace.1.in: Likewise.
* tests/strace-V.test: Check that "strace --version" output is the same
as "strace -V" output.
strace.1.in
strace.c
tests/strace-V.test