Subject: bin/1679: quota related command still use "ufs" for Unix Fast File system
To: None <gnats-bugs@gnats.netbsd.org>
From: Tatoku Ogaito <tacha@nuclth12.phys.sci.osaka-u.ac.jp>
List: netbsd-bugs
Date: 10/24/1995 17:47:03
>Number:         1679
>Category:       bin
>Synopsis:       quota related command still use "ufs" for Unix Fast File system
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 24 05:20:01 1995
>Last-Modified:
>Originator:     Tatoku Ogaito
>Organization:
Tatoku Ogaito		| Email: tacha@tera.phys.sci.osaka-u.ac.jp
Department of Physics   | WWW:   http://tera.phys.sci.osaka-u.ac.jp/~tacha/
Faculty of Science      | Tel  : +81 6-850-5346
Osaka University  	| Fax  : +81 6-850-5529
>Release:        -current as of 18 October 1995
>Environment:
System: NetBSD tera.phys.sci.osaka-u.ac.jp 1.1_ALPHA NetBSD 1.1_ALPHA (TERA) #2: Sat Oct 21 19:58:32 GMT 1995 tacha@tera.phys.sci.osaka-u.ac.jp:/usr/src/current/src/sys/arch/i386/compile/TERA i386


>Description:
	Following quota related commands still use "ufs" for 
      Unix "Fast" Filesystem and don't work with type "ffs".

      repquota, quotaon, edquota, quotacheck.

>How-To-Repeat:
	Try to quota with ffs mount type.
>Fix:
diff -c usr.sbin/quotaon/quotaon.c{~,}
*** usr.sbin/quotaon/quotaon.c~	Sat Oct 14 04:06:42 1995
--- usr.sbin/quotaon/quotaon.c	Tue Oct 24 07:50:39 1995
***************
*** 113,119 ****
  	}
  	setfsent();
  	while ((fs = getfsent()) != NULL) {
! 		if (strcmp(fs->fs_vfstype, "ufs") ||
  		    strcmp(fs->fs_type, FSTAB_RW))
  			continue;
  		if (aflag) {
--- 113,119 ----
  	}
  	setfsent();
  	while ((fs = getfsent()) != NULL) {
! 		if ((strcmp(fs->fs_vfstype, "ffs") && strcmp(fs->fs_vfstype, "ufs")) ||
  		    strcmp(fs->fs_type, FSTAB_RW))
  			continue;
  		if (aflag) {
diff -c sbin/quotacheck/quotacheck.c{~,}
*** sbin/quotacheck/quotacheck.c~	Sat Oct 14 01:13:11 1995
--- sbin/quotacheck/quotacheck.c	Tue Oct 24 07:33:37 1995
***************
*** 219,225 ****
  	register struct quotaname *qnp;
  	char *qfnp;
  
! 	if (strcmp(fs->fs_vfstype, "ufs") ||
  	    strcmp(fs->fs_type, FSTAB_RW))
  		return (NULL);
  	if ((qnp = malloc(sizeof(*qnp))) == NULL)
--- 219,225 ----
  	register struct quotaname *qnp;
  	char *qfnp;
  
! 	if ((strcmp(fs->fs_vfstype, "ffs") && strcmp(fs->fs_vfstype, "ufs"))||
  	    strcmp(fs->fs_type, FSTAB_RW))
  		return (NULL);
  	if ((qnp = malloc(sizeof(*qnp))) == NULL)
diff -c usr.sbin/edquota/edquota.c{~,}
*** usr.sbin/edquota/edquota.c~	Sat Oct 14 03:55:32 1995
--- usr.sbin/edquota/edquota.c	Tue Oct 24 07:30:35 1995
***************
*** 221,227 ****
  	quphead = (struct quotause *)0;
  	qcmd = QCMD(Q_GETQUOTA, quotatype);
  	while (fs = getfsent()) {
! 		if (strcmp(fs->fs_vfstype, "ufs"))
  			continue;
  		if (!hasquota(fs, quotatype, &qfpathname))
  			continue;
--- 221,227 ----
  	quphead = (struct quotause *)0;
  	qcmd = QCMD(Q_GETQUOTA, quotatype);
  	while (fs = getfsent()) {
! 		if (strcmp(fs->fs_vfstype, "ffs") && strcmp(fs->fs_vfstype, "ufs"))
  			continue;
  		if (!hasquota(fs, quotatype, &qfpathname))
  			continue;

	
diff -c usr.sbin/repquota/repquota.c{~,}
*** usr.sbin/repquota/repquota.c~	Sat Oct 14 04:07:43 1995
--- usr.sbin/repquota/repquota.c	Tue Oct 24 08:31:17 1995
***************
*** 131,137 ****
  	}
  	setfsent();
  	while ((fs = getfsent()) != NULL) {
! 		if (strcmp(fs->fs_vfstype, "ufs"))
  			continue;
  		if (aflag) {
  			if (gflag && hasquota(fs, GRPQUOTA, &qfnp))
--- 131,137 ----
  	}
  	setfsent();
  	while ((fs = getfsent()) != NULL) {
! 		if (strcmp(fs->fs_vfstype, "ffs") && strcmp(fs->fs_vfstype, "ufs"))
  			continue;
  		if (aflag) {
  			if (gflag && hasquota(fs, GRPQUOTA, &qfnp))
>Audit-Trail:
>Unformatted: