When I run dtracedctl --help, I get its usage message twice:
root@scylla1:/usr/home/rnw24 # dtracedctl --help
Usage: dtracedctl
--cleanup-state clean state in VM (all if not set).
--help display this help page.
--show-stats show statistics for a VM (all if not set).
Usage: dtracedctl
--cleanup-state clean state in VM (all if not set).
--help display this help page.
--show-stats show statistics for a VM (all if not set).
This appears to be because the HELP case in the switch statement calls print_help(), but so does the code at the end of the function after getopt_long() runs, if action isn’t usefully set (or matched). Possibly the --help switch statement entry should simply exit after printing usage information.
When I run
dtracedctl --help
, I get its usage message twice:This appears to be because the
HELP
case in the switch statement callsprint_help()
, but so does the code at the end of the function aftergetopt_long()
runs, ifaction
isn’t usefully set (or matched). Possibly the--help
switch statement entry should simply exit after printing usage information.