bin/75585: [unionfs] mount -p on unionfs results in non parsable fstab file

Matteo Riondato rionda at gufi.org
Sat Jun 11 15:30:27 GMT 2005


The following reply was made to PR bin/75585; it has been noted by GNATS.

From: Matteo Riondato <rionda at gufi.org>
To: bug-followup at FreeBSD.org, dirkx at webweaving.org
Cc:  
Subject: Re:bin/75585: [unionfs] mount -p on unionfs results in non parsable fstab file
Date: Sat, 11 Jun 2005 17:21:09 +0200

 Patch for this (can be found at http://www.riondabsd.net/diff/mount.diff ):
 --- mount.c.old	Sat Jun 11 14:22:44 2005
 +++ mount.c	Sat Jun 11 14:31:17 2005
 @@ -80,7 +80,7 @@
  			int, const char *, const char *);
  void	remopt(char *, const char *);
  void	prmount(struct statfs *);
 -void	putfsent(const struct statfs *);
 +void	putfsent(struct statfs *);
  void	usage(void);
  char   *flags2opts(int);
  
 @@ -714,12 +714,17 @@
  
  void
  putfsent(ent)
 -	const struct statfs *ent;
 +	struct statfs *ent;
  {
  	struct fstab *fst;
  	char *opts;
  
  	opts = flags2opts(ent->f_flags);
 +	if (strncmp(ent->f_mntfromname, "<below>", 7) == 0 ||
 +		strncmp(ent->f_mntfromname, "<above>", 7) == 0) {
 +		strcpy(ent->f_mntfromname,
 +			(strnstr(ent->f_mntfromname, ":", 8) +1));
 +	}	
  	printf("%s\t%s\t%s %s", ent->f_mntfromname, ent->f_mntonname,
  	    ent->f_fstypename, opts);
  	free(opts);
 
 
 Best Regards
 -- 
 Rionda aka Matteo Riondato
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)


More information about the freebsd-bugs mailing list