Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Sep 2001 01:12:50 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Jos Backus <josb@cncdsl.com>
Cc:        Kris Kennaway <kris@obsecurity.org>, freebsd-current@freebsd.org
Subject:   Re: mdmfs mount_mfs compatibility bug? 
Message-ID:   <200109300112.aa88479@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Sat, 29 Sep 2001 16:38:40 -0701." <20010929163840.B629@lizzy.bugworks.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20010929163840.B629@lizzy.bugworks.com>, Jos Backus writes:
>> 
>> This was fixed some time ago, I thought.  Are you up to date?
>
>There was a commit to mdmfs.c in August.
>This is with yesterday's -current, sorry, should have mentioned that.

The "mount -t mfs" case doesn't work with mdmfs, because mount(8)
uses the filesystem name, not the mount_xxx program as argv[0]. I
had guessed this would be a problem when I read the commit message
for revision 1.7 of mdmfs.c, but then I forgot to mention it to
Dima.

Here is a patch that should help - it makes mdmfs accept "mount_mfs"
or "mfs" to trigger compatibility mode instead of mount_*.

Ian

Index: mdmfs.8
===================================================================
RCS file: /dump/FreeBSD-CVS/src/sbin/mdmfs/mdmfs.8,v
retrieving revision 1.8
diff -u -r1.8 mdmfs.8
--- mdmfs.8	16 Aug 2001 07:43:16 -0000	1.8
+++ mdmfs.8	29 Sep 2001 23:50:29 -0000
@@ -304,9 +304,10 @@
 flag,
 or by starting
 .Nm
-with
-.Li mount_
-at the beginning of its name
+with the name
+.Li mount_mfs
+or
+.Li mfs
 (as returned by
 .Xr getprogname 3 ) .
 In this mode, only the options which would be accepted by
Index: mdmfs.c
===================================================================
RCS file: /dump/FreeBSD-CVS/src/sbin/mdmfs/mdmfs.c,v
retrieving revision 1.7
diff -u -r1.7 mdmfs.c
--- mdmfs.c	16 Aug 2001 02:40:29 -0000	1.7
+++ mdmfs.c	29 Sep 2001 22:58:05 -0000
@@ -116,8 +116,9 @@
 	newfs_arg = strdup("");
 	mount_arg = strdup("");
 
-	/* If we were started as mount_*, imply -C. */
-	if (strncmp(getprogname(), "mount_", 6) == 0)
+	/* If we were started as mount_mfs or mfs, imply -C. */
+	if (strcmp(getprogname(), "mount_mfs") == 0 ||
+	    strcmp(getprogname(), "mfs") == 0)
 		compat = true;
 
 	while ((ch = getopt(argc, argv,




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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