From owner-freebsd-current Sat Sep 29 17:12:56 2001 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 5008337B40B for ; Sat, 29 Sep 2001 17:12:52 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 30 Sep 2001 01:12:51 +0100 (BST) To: Jos Backus Cc: Kris Kennaway , freebsd-current@freebsd.org Subject: Re: mdmfs mount_mfs compatibility bug? In-Reply-To: Your message of "Sat, 29 Sep 2001 16:38:40 -0701." <20010929163840.B629@lizzy.bugworks.com> Date: Sun, 30 Sep 2001 01:12:50 +0100 From: Ian Dowse Message-ID: <200109300112.aa88479@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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