Subject: bin/436: mount(8) doesn't print types of mounted filesystems
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 08/26/1994 14:20:07
>Number:         436
>Category:       bin
>Synopsis:       mount(8) doesn't print types of mounted filesystems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 26 14:20:03 1994
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        
>Environment:
	
System: NetBSD ed209 1.0_BETA NetBSD 1.0_BETA (ED209) #0: Sat Aug 20 03:10:19 MET DST 1994 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386

Machine: i386
>Description:
	I think it is useful to know of what type the mounted filesystems are.
	Below is a patch for mount(8) that provides this.
>How-To-Repeat:
	
>Fix:
*** sbin/mount/mount.c-	Thu Jun  9 12:10:36 1994
--- sbin/mount/mount.c	Fri Aug 26 22:57:35 1994
***************
*** 69,75 ****
  void	mangle __P((char *, int *, const char **));
  int	mountfs __P((const char *, const char *, const char *,
  			int, const char *, const char *));
! void	prmount __P((const char *, const char *, int));
  void	usage __P((void));
  
  /* From mount_ufs.c. */
--- 69,75 ----
  void	mangle __P((char *, int *, const char **));
  int	mountfs __P((const char *, const char *, const char *,
  			int, const char *, const char *));
! void	prmount __P((const char *, const char *, const char *, int));
  void	usage __P((void));
  
  /* From mount_ufs.c. */
***************
*** 179,185 ****
  				if (badvfsname(mntbuf[i].f_fstypename, vfslist))
  					continue;
  				prmount(mntbuf[i].f_mntfromname,
! 				    mntbuf[i].f_mntonname, mntbuf[i].f_flags);
  			}
  		}
  		exit(rval);
--- 179,186 ----
  				if (badvfsname(mntbuf[i].f_fstypename, vfslist))
  					continue;
  				prmount(mntbuf[i].f_mntfromname,
! 				    mntbuf[i].f_mntonname,
! 				    mntbuf[i].f_fstypename, mntbuf[i].f_flags);
  			}
  		}
  		exit(rval);
***************
*** 378,384 ****
  				warn("statfs %s", name);
  				return (1);
  			}
! 			prmount(sf.f_mntfromname, sf.f_mntonname, sf.f_flags);
  		}
  		break;
  	}
--- 379,386 ----
  				warn("statfs %s", name);
  				return (1);
  			}
! 			prmount(sf.f_mntfromname, sf.f_mntonname,
! 			    sf.f_fstypename, sf.f_flags);
  		}
  		break;
  	}
***************
*** 387,400 ****
  }
  
  void
! prmount(spec, name, flags)
! 	const char *spec, *name;
  	int flags;
  {
  	struct opt *o;
  	int f;
  
! 	(void)printf("%s on %s", spec, name);
  
  	flags &= MNT_VISFLAGMASK;
  	for (f = 0, o = optnames; flags && o->o_opt; o++)
--- 389,402 ----
  }
  
  void
! prmount(spec, name, type, flags)
! 	const char *spec, *name, *type;
  	int flags;
  {
  	struct opt *o;
  	int f;
  
! 	(void)printf("%s on %s type %s", spec, name, type);
  
  	flags &= MNT_VISFLAGMASK;
  	for (f = 0, o = optnames; flags && o->o_opt; o++)
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------