aboutsummaryrefslogtreecommitdiff
path: root/sbin/quotacheck/quotacheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/quotacheck/quotacheck.c')
-rw-r--r--sbin/quotacheck/quotacheck.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index 634124e11043..b0a7df9ff393 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -192,6 +192,12 @@ main(argc, argv)
(void) addid((u_long)pw->pw_uid, USRQUOTA, pw->pw_name);
endpwent();
}
+ /*
+ * Setting maxrun (-l) makes no sense without the -a flag.
+ * Historically this was never an error, so we just warn.
+ */
+ if (maxrun > 0 && !aflag)
+ warnx("ignoring -l without -a");
if (aflag)
exit(checkfstab(1, maxrun, needchk, chkquota));
if (setfsent() == 0)
@@ -217,7 +223,7 @@ void
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
- "usage: quotacheck [-guv] -a",
+ "usage: quotacheck [-guv] [-l maxrun] -a",
" quotacheck [-guv] filesystem ...");
exit(1);
}