summaryrefslogtreecommitdiff
path: root/quota.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2003-02-14 18:50:16 +0000
committerjkar8572 <jkar8572>2003-02-14 18:50:16 +0000
commitf15de44817354eade928b52f5c9f9653e24a0920 (patch)
tree11ac272df233fc8bb47c30cf9dddb9c75acdcb91 /quota.c
parent891c333ab8ed72e935355cdb3242f601461db11e (diff)
downloadlinuxquota-f15de44817354eade928b52f5c9f9653e24a0920.tar.gz
Added option to ignore autofs mountpoints to quota(1), quot(8) and repquota(8) (Jan Kara, Paul Szabo)
Diffstat (limited to 'quota.c')
-rw-r--r--quota.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/quota.c b/quota.c
index 33eff9d..4e81e2d 100644
--- a/quota.c
+++ b/quota.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: quota.c,v 1.12 2002/07/23 15:59:27 jkar8572 Exp $"
+#ident "$Id: quota.c,v 1.13 2003/02/14 18:50:17 jkar8572 Exp $"
/*
* Disk quota reporting program.
@@ -67,6 +67,7 @@
#define FL_SMARTSIZE 16
#define FL_LOCALONLY 32
#define FL_QUIETREFUSE 64
+#define FL_NOAUTOFS 128
int flags, fmt = -1;
char *progname;
@@ -84,7 +85,7 @@ int main(int argc, char **argv)
gettexton();
progname = basename(argv[0]);
- while ((ret = getopt(argc, argv, "guqvsVlQF:")) != -1) {
+ while ((ret = getopt(argc, argv, "guqvsVliQF:")) != -1) {
switch (ret) {
case 'g':
flags |= FL_GROUP;
@@ -111,6 +112,9 @@ int main(int argc, char **argv)
case 'Q':
flags |= FL_QUIETREFUSE;
break;
+ case 'i':
+ flags |= FL_NOAUTOFS;
+ break;
case 'V':
version();
exit(0);
@@ -154,9 +158,9 @@ int main(int argc, char **argv)
void usage(void)
{
errstr( "%s%s%s",
- _("Usage: quota [-guqvs] [-l | -Q] [-F quotaformat]\n"),
- _("\tquota [-qvs] [-l | -Q] [-F quotaformat] -u username ...\n"),
- _("\tquota [-qvs] [-l | -Q] [-F quotaformat] -g groupname ...\n"));
+ _("Usage: quota [-guqvs] [-l | -Q] [-i] [-F quotaformat]\n"),
+ _("\tquota [-qvs] [-l | -Q] [-i] [-F quotaformat] -u username ...\n"),
+ _("\tquota [-qvs] [-l | -Q] [-i] [-F quotaformat] -g groupname ...\n"));
fprintf(stderr, _("Bugs to: %s\n"), MY_EMAIL);
exit(1);
}
@@ -173,7 +177,7 @@ int showquotas(int type, qid_t id)
time(&now);
id2name(id, type, name);
- handles = create_handle_list(0, NULL, type, fmt, IOI_READONLY | ((flags & FL_LOCALONLY) ? IOI_LOCALONLY : 0));
+ handles = create_handle_list(0, NULL, type, fmt, IOI_READONLY | ((flags & FL_LOCALONLY) ? IOI_LOCALONLY : 0), ((flags & FL_NOAUTOFS) ? MS_NO_AUTOFS : 0));
qlist = getprivs(id, handles, !!(flags & FL_QUIETREFUSE));
over = 0;
for (q = qlist; q; q = q->dq_next) {