aboutsummaryrefslogtreecommitdiff
path: root/bin/kiss-stat.c
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-15 14:03:55 +0000
committermerakor <cem@ckyln.com>2020-05-15 14:03:55 +0000
commite2112a9f0220af7d85df974e6d6e714d8ec97609 (patch)
treedb4e150a8a319947b8d29e2ab772278fb64c90ab /bin/kiss-stat.c
parent16d89890200d7745ef0ec1999b9098bf6eb4dabc (diff)
downloadcpt-e2112a9f0220af7d85df974e6d6e714d8ec97609.tar.gz
bin: accept '--help' arguments
FossilOrigin-Name: 72bce645308cdc351bf946ba29a0195c2e4a2c6974cf952c6e9391774e129273
Diffstat (limited to 'bin/kiss-stat.c')
-rw-r--r--bin/kiss-stat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/kiss-stat.c b/bin/kiss-stat.c
index d03bd13..5d62855 100644
--- a/bin/kiss-stat.c
+++ b/bin/kiss-stat.c
@@ -9,12 +9,13 @@
#include <pwd.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <string.h>
int main (int argc, char *argv[]) {
struct stat sb;
// Exit if no or multiple arguments are given
- if (argc != 2) {
+ if (argc != 2 || strcmp(argv[1], "--help") == 0) {
fprintf(stderr, "Usage: %s <pathname>\n", argv[0]);
return(1);
}