Comment 4 for bug 1616596

Revision history for this message
bugproxy (bugproxy) wrote : 0001-ziomon-Use-exit-code-0-for-version-and-help.patch

------- Comment on attachment From <email address hidden> 2016-09-06 08:39 EDT-------

[PATCH] ziomon: Use exit code 0 for --version and --help

Besides of this also unify the exit codes for help in case of wrong
number of parameters:

 # /usr/sbin/ziomon_util
 Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
 # echo $?
 255

 # /usr/sbin/ziomon_mgr
   Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
 # echo $?
 0

With this patch we use exit code 1 (EXIT_FAILURE) in this case:

 # ./ziomon_util
 Usage: ziomon_util [-h] [-v] [-V] [-i n] [-s n] [-Q <msgq_path> ...
 # echo $?
 1

Signed-off-by: Michael Holzheu <email address hidden>