Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2005 15:12:53 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] Teaching mount(8) to use nmount()
Message-ID:  <20051009131253.GB7463@garage.freebsd.pl>
In-Reply-To: <20051008024620.GA29824@crodrigues.org>
References:  <20051008024620.GA29824@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--OBd5C1Lgu00Gd/Tn
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 07, 2005 at 10:46:20PM -0400, Craig Rodrigues wrote:
+> +static int
+> +use_mountprog(const char *vfstype)
+> +{
+> +	/* XXX: We need to get away from implementing external mount
+> +	 *      programs for every filesystem, and move towards having
+> +	 *	each filesystem properly implement the nmount() system call.
+> +	 */
+> +	unsigned int i;
+> +	const char *fs[] =3D {
+> +	"cd9660", "ext2fs", "mfs", "msdosfs", "nfs", "nfs4", "ntfs",
+> +	"nwfs", "nullfs", "portalfs", "reiserfs", "smbfs", "udf", "umapfs",
+> +	"unionfs",
+> +	NULL
+> +	};
+> +
+> +	for (i=3D0; fs[i] !=3D NULL; ++i) {
+> +		if (strcmp(vfstype, fs[i]) =3D=3D 0)
+> +			return 1;
+> +	}
+> +=09
+> +	return 0;
+> +}

Can't we just check if there is an external binary in _PATH_SYSPATH?
It'll be easier to add new file system then (there will be no need to
change this function).

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--OBd5C1Lgu00Gd/Tn
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFDSRdVForvXbEpPzQRAmPSAJ9ynFt+zyoIFrbvxVvCpmYEnTCs9ACgp71+
YEG4FKKSwQfGlvUou97/hQ0=
=TtPI
-----END PGP SIGNATURE-----

--OBd5C1Lgu00Gd/Tn--



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