From e2112a9f0220af7d85df974e6d6e714d8ec97609 Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 15 May 2020 14:03:55 +0000 Subject: bin: accept '--help' arguments FossilOrigin-Name: 72bce645308cdc351bf946ba29a0195c2e4a2c6974cf952c6e9391774e129273 --- bin/kiss-readlink.c | 3 ++- bin/kiss-stat.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/kiss-readlink.c b/bin/kiss-readlink.c index 86e1fee..04426f0 100644 --- a/bin/kiss-readlink.c +++ b/bin/kiss-readlink.c @@ -4,12 +4,13 @@ // This is basically a 'readlink -f' command. #include #include +#include int main(int argc, char *argv[]) { char buf[512]; - if (argc != 2) { + if (argc != 2 || strcmp(argv[1], "--help") == 0) { printf("usage: %s \n", argv[0]); return(1); } 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 #include #include +#include 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 \n", argv[0]); return(1); } -- cgit v1.2.3