summaryrefslogtreecommitdiffstats
path: root/usr.sbin/quot
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2001-03-10 12:12:47 +0000
committerps <ps@FreeBSD.org>2001-03-10 12:12:47 +0000
commita9b8e8be5d560774accffee6d14de8dfce8c81ba (patch)
tree9b607a163b833d545b2fe321d49a59dadd13a40b /usr.sbin/quot
parente05fe2f2533e64a41c2b101187d67652bb19c036 (diff)
downloadFreeBSD-src-a9b8e8be5d560774accffee6d14de8dfce8c81ba.zip
FreeBSD-src-a9b8e8be5d560774accffee6d14de8dfce8c81ba.tar.gz
Allow for the last arugment to be the mountpoint of a filesystem,
not just the device.
Diffstat (limited to 'usr.sbin/quot')
-rw-r--r--usr.sbin/quot/quot.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c
index 01f822e..0864015 100644
--- a/usr.sbin/quot/quot.c
+++ b/usr.sbin/quot/quot.c
@@ -43,6 +43,7 @@ static const char rcsid[] =
#include <err.h>
#include <fcntl.h>
+#include <fstab.h>
#include <errno.h>
#include <paths.h>
#include <pwd.h>
@@ -526,6 +527,7 @@ main(argc,argv)
{
char all = 0;
struct statfs *mp;
+ struct fstab *fs;
char dev[MNAMELEN + 1];
char *nm;
int cnt;
@@ -578,7 +580,12 @@ main(argc,argv)
}
}
}
- while (--argc >= 0)
- quot(*argv++,0);
+ while (--argc >= 0) {
+ if ((fs = getfsfile(*argv)) != NULL)
+ quot(fs->fs_spec, 0);
+ else
+ quot(*argv,0);
+ argv++;
+ }
return 0;
}
OpenPOWER on IntegriCloud