]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
tools/lssubsys: use exit code 129 on invalid usage
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 29 Sep 2022 10:21:06 +0000 (15:51 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 30 Sep 2022 14:34:55 +0000 (08:34 -0600)
The exit code 1 refers to general error and using -1 wraps to
255, both codes do not signify bad arguments. Let's use exit code 129
(EXIT_BADARGS) for hinting to the users about invalid usage.

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

index b587407293fa0fe07b2e00441f777f966f0886fd..c143d175ef6cdaabddea8f6303af30ef39a6f568 100644 (file)
@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
                        break;
                default:
                        usage(1, argv[0]);
-                       return -1;
+                       exit(EXIT_BADARGS);
                }
        }