]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools: introduce bad arguments exit code
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 29 Sep 2022 10:19:50 +0000 (15:49 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 30 Sep 2022 14:34:55 +0000 (08:34 -0600)
commit38d48493df8b5cba30b7ae29d738b11f4e1958e1
tree99f3a67759f515bf619bc0ad20a9ba10f05ea278
parentde86f6862d439f4c680f07f02a1496661bb1f7a7
tools: introduce bad arguments exit code

Introduce EXIT_BADARGS (129) error code to return, when the user passes
an invalid list of arguments. Currently, we return exit 1 which refers
to a general error, or exit -1 which wraps to 255, both codes do not
signify bad arguments. Let's use EXIT_BADARGS (exit code 129), from
tools hinting to the users about invalid usage.

Suggested-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/tools/tools-common.h