Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Oct 2006 12:11:43 +0200
From:      Matteo Riondato <matteo@freebsd.org>
To:        freebsd-arch@freebsd.org
Subject:   RFC: use of mdmfs "new" options in fstab
Message-ID:  <20061001101143.GB94004@kaiser.sig11.org>

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

--pZs/OQEoSSbxGlYw
Content-Type: multipart/mixed; boundary="JWEK1jqKZ6MHAcjA"
Content-Disposition: inline


--JWEK1jqKZ6MHAcjA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,
I'm writing to ask for comments about the following proposal.

During the years, mdmfs(8) has got many options which are not
available in the "mount_mfs" compatibility mode (activated by
specifing -C on the command line or by calling mount_mfs).

This means that it's impossible to use mdmfs "new" option in fstab,
which is quite limiting.

I think there are two possibilities to solve this:

1) install mdmfs as mount_md (or mount_$something) and teach mount to
recognize it. See attached mdmfsmakefile_mount.c.diff . This will
allow to specify the following line in fstab (the -P option is not
available in compatability mode):

md      /usr/jail/jail1 md      ro,-P,-F/usr/jailmd/jail1.md    0 0

2)disable bug-for-bug compatibility with mount_mfs when the
program name is "mount_mfs" or "mfs". The "-C" otion will still be
available for those who want compatibility. See attached
mdmfs.c.diff .

I would prefer option #2, but any comment is really appreciated.
Thanks in advance
Best regards
--=20
Matteo Riondato
FreeBSD Committer (http://www.freebsd.org)
G.U.F.I. Staff Member (http://www.gufi.org)
FreeSBIE Developer (http://www.freesbie.org)

--JWEK1jqKZ6MHAcjA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mdmfsmakefile_mount.c.diff"
Content-Transfer-Encoding: quoted-printable

Index: mdmfs/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/rionda/branch/ncvs/src/sbin/mdmfs/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- mdmfs/Makefile	25 Jan 2005 14:28:31 -0000	1.6
+++ mdmfs/Makefile	1 Oct 2006 09:03:47 -0000
@@ -2,8 +2,10 @@
=20
 PROG=3D		mdmfs
 LINKS=3D		${BINDIR}/${PROG} ${BINDIR}/mount_mfs
+LINKS+=3D 	${BINDIR}/${PROG} ${BINDIR}/mount_md
 MAN=3D		mdmfs.8
 MLINKS+=3D	mdmfs.8 mount_mfs.8
+MLINKS+=3D	mdmfs.8 mount_md.8
 WARNS?=3D		6
=20
 .include <bsd.prog.mk>
Index: mount/mount.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/rionda/branch/ncvs/src/sbin/mount/mount.c,v
retrieving revision 1.88
diff -u -r1.88 mount.c
--- mount/mount.c	12 Jul 2006 16:05:51 -0000	1.88
+++ mount/mount.c	1 Oct 2006 08:47:09 -0000
@@ -132,7 +132,7 @@
 	 */
 	unsigned int i;
 	const char *fs[] =3D {
-	"cd9660", "mfs", "msdosfs", "nfs", "nfs4", "ntfs",
+	"cd9660", "md", "mfs", "msdosfs", "nfs", "nfs4", "ntfs",
 	"nwfs", "nullfs", "portalfs", "smbfs", "udf", "umapfs",
 	"unionfs",
 	NULL

--JWEK1jqKZ6MHAcjA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mdmfs.c.diff"
Content-Transfer-Encoding: quoted-printable

Index: mdmfs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/rionda/branch/ncvs/src/sbin/mdmfs/mdmfs.c,v
retrieving revision 1.27
diff -u -r1.27 mdmfs.c
--- mdmfs.c	16 Feb 2006 21:28:54 -0000	1.27
+++ mdmfs.c	1 Oct 2006 10:08:31 -0000
@@ -117,11 +117,6 @@
 	newfs_arg =3D strdup("");
 	mount_arg =3D strdup("");
=20
-	/* If we were started as mount_mfs or mfs, imply -C. */
-	if (strcmp(getprogname(), "mount_mfs") =3D=3D 0 ||
-	    strcmp(getprogname(), "mfs") =3D=3D 0)
-		compat =3D true;
-
 	while ((ch =3D getopt(argc, argv,
 	    "a:b:Cc:Dd:E:e:F:f:hi:LlMm:Nn:O:o:Pp:Ss:t:Uv:w:X")) !=3D -1)
 		switch (ch) {

--JWEK1jqKZ6MHAcjA--

--pZs/OQEoSSbxGlYw
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFFH5Rf2Mp4pR7Fa+wRAoM8AKDFO7P3OB5HXXL4Fsx6Dx9meXbl9QCfTTOq
VQRfLuLWiN4jU9cQyc7+tKE=
=FeFT
-----END PGP SIGNATURE-----

--pZs/OQEoSSbxGlYw--



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