From owner-freebsd-arch@FreeBSD.ORG Sun Oct 9 13:13:16 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E25E016A420 for ; Sun, 9 Oct 2005 13:13:16 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from swift.wheel.pl (zoidberg.sec-force.net [80.55.205.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BC8443D48 for ; Sun, 9 Oct 2005 13:13:15 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from localhost (bng128.neoplus.adsl.tpnet.pl [83.28.252.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by swift.wheel.pl (Postfix) with ESMTP id E31DD8A02E; Sun, 9 Oct 2005 15:06:37 +0200 (CEST) Date: Sun, 9 Oct 2005 15:12:53 +0200 From: Pawel Jakub Dawidek To: Craig Rodrigues Message-ID: <20051009131253.GB7463@garage.freebsd.pl> References: <20051008024620.GA29824@crodrigues.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OBd5C1Lgu00Gd/Tn" Content-Disposition: inline In-Reply-To: <20051008024620.GA29824@crodrigues.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] Teaching mount(8) to use nmount() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2005 13:13:17 -0000 --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--