if (strcmp(fs->fs_type, FSTAB_RW))
return (NULL);
if (strcmp(fs->fs_vfstype, "ffs") &&
- strcmp(fs->fs_vfstype, "ufs"))
+ strcmp(fs->fs_vfstype, "ufs") &&
+ strcmp(fs->fs_vfstype, "mfs"))
return (NULL);
if ((qnp = malloc(sizeof(*qnp))) == NULL)
err(1, "%s", strerror(errno));
#ifndef lint
/*static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$Id: quota.c,v 1.3 1996/04/21 23:43:38 deraadt Exp $";
+static char rcsid[] = "$Id: quota.c,v 1.4 1996/04/25 11:04:06 deraadt Exp $";
#endif /* not lint */
/*
if (strncmp(fst[i].f_fstypename, "nfs", MFSNAMELEN) == 0) {
if (getnfsquota(&fst[i], NULL, qup, id, quotatype) == 0)
continue;
- } else if ((strncmp(fst[i].f_fstypename, "ffs",
- MFSNAMELEN) == 0) || (strncmp(fst[i].f_fstypename, "ufs",
- MFSNAMELEN) == 0)) {
+ } else if (!strncmp(fst[i].f_fstypename, "ffs", MFSNAMELEN) ||
+ !strncmp(fst[i].f_fstypename, "ufs", MFSNAMELEN) ||
+ !strncmp(fst[i].f_fstypename, "mfs", MFSNAMELEN)) {
/*
* XXX
* UFS filesystems must be in /etc/fstab, and must
#ifndef lint
/*static char sccsid[] = "from: @(#)edquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: edquota.c,v 1.5 1996/04/21 23:40:32 deraadt Exp $";
+static char *rcsid = "$Id: edquota.c,v 1.6 1996/04/25 11:04:08 deraadt Exp $";
#endif /* not lint */
/*
qcmd = QCMD(Q_GETQUOTA, quotatype);
while (fs = getfsent()) {
if (strcmp(fs->fs_vfstype, "ffs") &&
- strcmp(fs->fs_vfstype, "ufs"))
+ strcmp(fs->fs_vfstype, "ufs") &&
+ strcmp(fs->fs_vfstype, "mfs"))
continue;
if (!hasquota(fs, quotatype, &qfpathname))
continue;
*/
#ifndef lint
-static char rcsid[] = "$Id: quot.c,v 1.2 1995/11/06 21:40:54 deraadt Exp $";
+static char rcsid[] = "$Id: quot.c,v 1.3 1996/04/25 11:04:11 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
if (all) {
cnt = getmntinfo(&mp,MNT_NOWAIT);
for (; --cnt >= 0; mp++) {
- if (!strncmp(mp->f_fstypename, MOUNT_FFS, MFSNAMELEN)) {
+ if (!strncmp(mp->f_fstypename, MOUNT_FFS, MFSNAMELEN) ||
+ !strncmp(mp->f_fstypename, MOUNT_MFS, MFSNAMELEN) ||
+ !strncmp(mp->f_fstypename, "ufs", MFSNAMELEN)) {
if (nm = strrchr(mp->f_mntfromname,'/')) {
sprintf(dev,"/dev/r%s",nm + 1);
nm = dev;
#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 */
/*
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))
/*
* 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;
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);
#ifndef lint
/*static char sccsid[] = "from: @(#)repquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: repquota.c,v 1.5 1996/04/21 23:41:45 deraadt Exp $";
+static char *rcsid = "$Id: repquota.c,v 1.6 1996/04/25 11:04:14 deraadt Exp $";
#endif /* not lint */
/*
setfsent();
while ((fs = getfsent()) != NULL) {
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))