diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-04-25 11:04:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-04-25 11:04:15 +0000 |
commit | d44dfb5d692e3c38d987ca775af156909295c7b3 (patch) | |
tree | 759aa2ffdbb51a608103f4e3321f9d86a53f0818 /usr.sbin/quotaon | |
parent | 9c7eb29f7fb5a32d3efc92b6e8ef8e77c91f6138 (diff) |
permit quotas to work on mfs; problem reported by rdante@pnet.net
Diffstat (limited to 'usr.sbin/quotaon')
-rw-r--r-- | usr.sbin/quotaon/quotaon.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index bb0fdc0aeb0..5dd2769331c 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -42,7 +42,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)quotaon.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: quotaon.c,v 1.5 1996/04/21 23:41:36 deraadt Exp $"; +static char *rcsid = "$Id: quotaon.c,v 1.6 1996/04/25 11:04:13 deraadt Exp $"; #endif /* not lint */ /* @@ -117,7 +117,8 @@ main(argc, argv) if (strcmp(fs->fs_type, FSTAB_RW)) continue; if (strcmp(fs->fs_vfstype, "ffs") && - strcmp(fs->fs_vfstype, "ufs")) + strcmp(fs->fs_vfstype, "ufs") && + strcmp(fs->fs_vfstype, "mfs")) continue; if (aflag) { if (gflag && hasquota(fs, GRPQUOTA, &qfnp)) @@ -236,6 +237,7 @@ hasquota(fs, type, qfnamep) /* * Verify file system is mounted and not readonly. + * MFS is special -- it puts "mfs:" in the kernel's mount table */ readonly(fs) register struct fstab *fs; @@ -245,8 +247,13 @@ readonly(fs) if (statfs(fs->fs_file, &fsbuf) < 0 || strcmp(fsbuf.f_mntonname, fs->fs_file) || strcmp(fsbuf.f_mntfromname, fs->fs_spec)) { - printf("%s: not mounted\n", fs->fs_file); - return (1); + if (strcmp(fs->fs_file, "mfs") || + memcmp(fsbuf.f_mntfromname, "mfs:", sizeof("mfs:")-1)) + ; + else { + printf("%s: not mounted\n", fs->fs_file); + return (1); + } } if (fsbuf.f_flags & MNT_RDONLY) { printf("%s: mounted read-only\n", fs->fs_file); |