diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-08-09 00:53:00 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-08-09 00:53:00 +0000 |
commit | 6e02be778087979a6673a8421ec064509b9a5e51 (patch) | |
tree | ec856aa68baf87a9a425e6a9cbc08b8f7ba572bc | |
parent | 10e78eec8cdc3b77ab3d31c96f2759f477f6e855 (diff) | |
download | FreeBSD-src-6e02be778087979a6673a8421ec064509b9a5e51.zip FreeBSD-src-6e02be778087979a6673a8421ec064509b9a5e51.tar.gz |
Add a new flag (-l) that suppresses quota checks on NFS filesystems.
PR: bin/12939
Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
-rw-r--r-- | usr.bin/quota/quota.1 | 19 | ||||
-rw-r--r-- | usr.bin/quota/quota.c | 14 |
2 files changed, 26 insertions, 7 deletions
diff --git a/usr.bin/quota/quota.1 b/usr.bin/quota/quota.1 index 314c083..3974c1b 100644 --- a/usr.bin/quota/quota.1 +++ b/usr.bin/quota/quota.1 @@ -35,7 +35,7 @@ .\" from: @(#)quota.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd August 8, 2002 .Dt QUOTA 1 .Os .Sh NAME @@ -43,14 +43,15 @@ .Nd display disk usage and limits .Sh SYNOPSIS .Nm -.Op Fl gu +.Op Fl glu .Op Fl v | Fl q .Nm -.Op Fl u +.Op Fl lu .Op Fl v | Fl q .Ar user ... .Nm .Fl g +.Op Fl l .Op Fl v | Fl q .Ar group ... .Sh DESCRIPTION @@ -64,6 +65,10 @@ The following options are available: .It Fl g Print group quotas for the group of which the user is a member. +.It Fl l +Do not report quotas on +.Tn NFS +filesystems. .It Fl q Print a more terse message, containing only information @@ -120,6 +125,14 @@ If .Nm exits with a non-zero status, one or more filesystems are over quota. +.Pp +If the +.Fl l +flag is specified, +.Nm +will not check +.Tn NFS +filesystems. .Sh FILES .Bl -tag -width quota.group -compact .It Pa quota.user diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index be83e64..6ce25bf 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -105,6 +105,7 @@ static int callaurpc(char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); static int alldigits(char *s); +int lflag; int qflag; int vflag; @@ -116,11 +117,14 @@ main(int argc, char *argv[]) int i, gflag = 0, uflag = 0; char ch; - while ((ch = getopt(argc, argv, "gquv")) != -1) { + while ((ch = getopt(argc, argv, "glquv")) != -1) { switch(ch) { case 'g': gflag++; break; + case 'l': + lflag++; + break; case 'q': qflag++; break; @@ -180,9 +184,9 @@ usage(void) { fprintf(stderr, "%s\n%s\n%s\n", - "usage: quota [-gu] [-v | -q]", - " quota [-u] [-v | -q] user ...", - " quota -g [-v | -q] group ..."); + "usage: quota [-glu] [-v | -q]", + " quota [-lu] [-v | -q] user ...", + " quota -g [-l] [-v | -q] group ..."); exit(1); } @@ -461,6 +465,8 @@ getprivs(long id, int quotatype) errx(2, "out of memory"); } if (strcmp(fst[i].f_fstypename, "nfs") == 0) { + if (lflag) + continue; if (getnfsquota(&fst[i], qup, id, quotatype) == 0) continue; |