aboutsummaryrefslogtreecommitdiff
path: root/minc.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 21:57:28 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 21:59:26 +0200
commit7e33bac77e74f1a8208c01c6b31f83fe4c35a1ee (patch)
tree20cd12acd2d6a86c419d24d4ec0ff0b3f1503e40 /minc.c
parent00540708269728b7fc88888be97e125c1299e3fe (diff)
downloadmblaze-7e33bac77e74f1a8208c01c6b31f83fe4c35a1ee.tar.gz
minc: add usage
Diffstat (limited to 'minc.c')
-rw-r--r--minc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/minc.c b/minc.c
index d5da38a..a8e6cb9 100644
--- a/minc.c
+++ b/minc.c
@@ -66,10 +66,14 @@ main(int argc, char *argv[])
switch(c) {
case 'q': qflag = 1; break;
default:
- // XXX usage
+ usage:
+ fprintf(stderr, "Usage: minc [-q] dirs...\n");
exit(1);
}
+ if (optind == argc)
+ goto usage;
+
status = 0;
for (i = optind; i < argc; i++)
inc(argv[i]);