Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2007 23:31:36 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-current@freebsd.org
Subject:   Re: [patch] mount fails to call external programs
Message-ID:  <45C19758.8070704@u.washington.edu>
In-Reply-To: <20070201002623.b8cb5d08.ota@j.email.ne.jp>
References:  <20070201002623.b8cb5d08.ota@j.email.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
Yoshihiro Ota wrote:
> Hello.
> 
> The 'mount' program attempts to maintain external mount programs in order to determine whether it needs to call external programs or handle it internally.
> 
> Not all external programs can be listed in mount.c.  Indeed, my mount_md failed after mount trying to handle it itself.
> 
> The solution is to maintain interally handlable fs types.
> 
> I am not fully sure if I listed all of them correctly; however, it fixes the problem.
> 
> Thanks,
> Hiro
> 
> 
> ------------------------------------------------------------------------
> 
> Index: mount.c
> ===================================================================
> RCS file: /home/ncvs/src/sbin/mount/mount.c,v
> retrieving revision 1.92
> diff -u -r1.92 mount.c
> --- mount.c	14 Nov 2006 01:07:42 -0000	1.92
> +++ mount.c	1 Feb 2007 05:25:55 -0000
> @@ -133,18 +133,19 @@
>  	 */
>  	unsigned int i;
>  	const char *fs[] = {
> -	"cd9660", "mfs", "msdosfs", "nfs", "nfs4", "ntfs",
> -	"nwfs", "nullfs", "portalfs", "smbfs", "udf", "umapfs",
> -	"unionfs",
> +	"ufs",
> +	"ext2fs",
> +	"devfs", "fdescfs", "procfs", "linprocfs", "linsysfs",
> +	"std",
>  	NULL
>  	};
>  
>  	for (i = 0; fs[i] != NULL; ++i) {
>  		if (strcmp(vfstype, fs[i]) == 0)
> -			return (1);
> +			return (0);
>  	}
>  	
> -	return (0);
> +	return (1);
>  }
>  
>  static int
> 
> 
> ------------------------------------------------------------------------

Unfortunately your patch voids the point of having the filesystems 
listed there, according to the author of the comment directly above 
structure you have shown.

I honestly don't know why anyone would want to statically define that 
though, because mount_* searching in $PATH should suffice, and the 
nmount interface could be maintained in each sourcefile. Just my 
thoughts on the subject though..

-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45C19758.8070704>