aboutsummaryrefslogtreecommitdiff
path: root/src/checkown.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-21 11:52:37 +0000
committerRoy Marples <roy@marples.name>2007-09-21 11:52:37 +0000
commite0d06f556ea52ee7e7d2044f116bd94187448577 (patch)
tree9c735041ff7c3204cbd95712ece6ee4dd7f859fc /src/checkown.c
parentfaa555efe24bd77f751c65c76596034ad7d2fe90 (diff)
Add extraopts to our usage
Diffstat (limited to 'src/checkown.c')
-rw-r--r--src/checkown.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/checkown.c b/src/checkown.c
index 9402b8af..d9294dac 100644
--- a/src/checkown.c
+++ b/src/checkown.c
@@ -132,6 +132,7 @@ static struct group *get_group (const char *name)
}
#include "_usage.h"
+#define extraopts "dir1 dir2 ..."
#define getoptstring "fm:g:u:" getoptstring_COMMON
static struct option longopts[] = {
{ "directory", 0, NULL, 'd'},
@@ -190,6 +191,9 @@ int checkown (int argc, char **argv)
}
}
+ if (optind >= argc)
+ usage (EXIT_FAILURE);
+
if (pw) {
uid = pw->pw_uid;
gid = pw->pw_gid;