summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhuk <zhuk@openbsd.org>2015-10-26 17:55:32 +0000
committerzhuk <zhuk@openbsd.org>2015-10-26 17:55:32 +0000
commit07e1d38d1e3f43b86636e28b643fd0859d149db3 (patch)
tree5fe854c371554e14d8e1f8517832777d48bb6705
parentAdd ppoll() to "stdio" (diff)
downloadwireguard-openbsd-07e1d38d1e3f43b86636e28b643fd0859d149db3.tar.xz
wireguard-openbsd-07e1d38d1e3f43b86636e28b643fd0859d149db3.zip
Put repquota in line with other utilities: you either wants list everyting,
effectively using -a, or you specify filesystems one-by-one. Doing both resulted in a funny error messages, so just don't allow that silly behaviour. okay millert@
-rw-r--r--usr.sbin/repquota/repquota.813
-rw-r--r--usr.sbin/repquota/repquota.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/repquota/repquota.8 b/usr.sbin/repquota/repquota.8
index 1c173e5efee..9bfb87fd793 100644
--- a/usr.sbin/repquota/repquota.8
+++ b/usr.sbin/repquota/repquota.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: repquota.8,v 1.10 2007/05/31 19:20:28 jmc Exp $
+.\" $OpenBSD: repquota.8,v 1.11 2015/10/26 17:55:32 zhuk Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,17 +31,20 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)repquota.8 8.1 (Berkeley) 6/6/93
-.\" $Id: repquota.8,v 1.10 2007/05/31 19:20:28 jmc Exp $
+.\" $Id: repquota.8,v 1.11 2015/10/26 17:55:32 zhuk Exp $
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 26 2015 $
.Dt REPQUOTA 8
.Os
.Sh NAME
.Nm repquota
.Nd summarize quotas for a file system
.Sh SYNOPSIS
-.Nm repquota
-.Op Fl aguv
+.Nm
+.Op Fl guv
+.Fl a
+.Nm
+.Op Fl guv
.Ar filesystem ...
.Sh DESCRIPTION
.Nm
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c
index 8376bea3210..bbde734daaf 100644
--- a/usr.sbin/repquota/repquota.c
+++ b/usr.sbin/repquota/repquota.c
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
}
argc -= optind;
argv += optind;
- if (argc == 0 && !aflag)
+ if ((argc == 0) == (aflag == 0))
usage();
if (!gflag && !uflag) {
if (aflag)